mirror of
https://github.com/SrIzan10/Recluse-Bot.git
synced 2026-05-01 10:55:24 +00:00
Create websay.js
This commit is contained in:
23
commands/utility/websay.js
Normal file
23
commands/utility/websay.js
Normal file
@@ -0,0 +1,23 @@
|
||||
module.exports = {
|
||||
name: "websay",
|
||||
description: "Makes a webhook to impersonate someone",
|
||||
usage: "websay <user> <message>",
|
||||
category: "utility",
|
||||
args: true,
|
||||
cooldown: 5,
|
||||
botpermission: ["MANAGE_WEBHOOKS"],
|
||||
run: async (client, message, args) => {
|
||||
message.delete();
|
||||
let user =
|
||||
message.mentions.members.first() ||
|
||||
message.guild.members.cache.get(args[0]);
|
||||
if (!user) return message.channel.send("Please provide a user!");
|
||||
const webhook = await message.channel.createWebhook(user.displayName, {
|
||||
avatar: user.user.displayAvatarURL(),
|
||||
channel: message.channel.id
|
||||
});
|
||||
await webhook.send(args.slice(1).join(" ")).then(() => {
|
||||
webhook.delete();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user