mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Beep
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
const Command = require('../../structures/Command');
|
||||||
|
|
||||||
|
module.exports = class ClearChannelCommand extends Command {
|
||||||
|
constructor(client) {
|
||||||
|
super(client, {
|
||||||
|
name: 'clear-channel',
|
||||||
|
group: 'moderation',
|
||||||
|
memberName: 'clear-channel',
|
||||||
|
description: 'Deletes all messages in a channel by cloning it and then deleting it.',
|
||||||
|
guildOnly: true,
|
||||||
|
throttling: {
|
||||||
|
usages: 1,
|
||||||
|
duration: 30
|
||||||
|
},
|
||||||
|
clientPermissions: ['MANAGE_CHANNELS'],
|
||||||
|
userPermissions: ['MANAGE_CHANNELS', 'MANAGE_MESSAGES']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async run(msg) {
|
||||||
|
if (!msg.channel.deletable) return msg.say('This channel cannot be deleted.');
|
||||||
|
await msg.channel.clone();
|
||||||
|
await msg.channel.delete();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "40.5.1",
|
"version": "40.6.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
"zalgolize": "^1.2.4"
|
"zalgolize": "^1.2.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^4.6.1",
|
"eslint": "^4.7.0",
|
||||||
"eslint-config-aqua": "^2.0.1"
|
"eslint-config-aqua": "^2.0.1"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
|
|||||||
Reference in New Issue
Block a user