mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 15:57:50 +02:00
22.0.0
This commit is contained in:
@@ -23,20 +23,12 @@ module.exports = class WebhookCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return this.client.isOwner(msg.author);
|
||||
}
|
||||
|
||||
async run(msg, args) {
|
||||
const { content } = args;
|
||||
try {
|
||||
msg.delete();
|
||||
await snekfetch
|
||||
.post(WEBHOOK_URL)
|
||||
.send({ content });
|
||||
return null;
|
||||
} catch (err) {
|
||||
return msg.say(`${err.name}: ${err.message}`);
|
||||
}
|
||||
msg.delete();
|
||||
await snekfetch
|
||||
.post(WEBHOOK_URL)
|
||||
.send({ content });
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user