diff options
Diffstat (limited to 'src/commands/bot')
| -rw-r--r-- | src/commands/bot/clientid.ts | 6 | ||||
| -rw-r--r-- | src/commands/bot/invite.ts | 6 | ||||
| -rw-r--r-- | src/commands/bot/joinmessage.ts | 29 | ||||
| -rw-r--r-- | src/commands/bot/memorystats.ts | 7 | ||||
| -rw-r--r-- | src/commands/bot/memoryusage.ts | 7 | ||||
| -rw-r--r-- | src/commands/bot/servercount.ts | 29 |
6 files changed, 80 insertions, 4 deletions
diff --git a/src/commands/bot/clientid.ts b/src/commands/bot/clientid.ts index da7717e..ea89891 100644 --- a/src/commands/bot/clientid.ts +++ b/src/commands/bot/clientid.ts @@ -12,7 +12,11 @@ module.exports = class ClientIDBot extends Command { description: 'Tells you the bot\'s client ID version.', examples: ['uwu!clientid', 'uwu!cid'], userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, }); } run(msg: CommandoMessage) { diff --git a/src/commands/bot/invite.ts b/src/commands/bot/invite.ts index 8c798d1..0b72063 100644 --- a/src/commands/bot/invite.ts +++ b/src/commands/bot/invite.ts @@ -11,7 +11,11 @@ module.exports = class InviteBot extends Command { description: 'Gives you the bot\'s invite link.', examples: ['uwu!invite', 'uwu!inv'], userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, }); } run(msg: CommandoMessage) { diff --git a/src/commands/bot/joinmessage.ts b/src/commands/bot/joinmessage.ts new file mode 100644 index 0000000..a98bee5 --- /dev/null +++ b/src/commands/bot/joinmessage.ts @@ -0,0 +1,29 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; + +module.exports = class InviteBot extends Command { + constructor(client) { + super(client, { + name: 'joinmessage', + aliases: ['joinm', 'mjoin', 'joinmsg'], + group: 'bot', + memberName: 'joinmessage', + description: 'Resends the message which the bot sends when initially joining a server, however, this one doesn\'t go to the guild owner.', + examples: [ + 'uwu!joinmessage', + 'uwu!joinm', + 'uwu!mjoin', + 'uwu!joinmsg' + ], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + msg.reply('Hi! Thank you for inviting my bot to your server! To view the complete list of commands, do `uwu!help`. If you\'d like, you can also change the prefix using `uwu!prefix change <prefix>`. If you want to contact the lead developer for possible suggestions or to report a bug, please join the support server: https://crack.cf/uwufier-support. ' + emoji.random()) + } +};
\ No newline at end of file diff --git a/src/commands/bot/memorystats.ts b/src/commands/bot/memorystats.ts index 669ac84..fd8be76 100644 --- a/src/commands/bot/memorystats.ts +++ b/src/commands/bot/memorystats.ts @@ -18,7 +18,12 @@ module.exports = class MemoryStatsBot extends Command { memberName: 'memorystats', description: 'Checks the full, current, approximate memory usage statistics of the bot\'s Node.js process.', userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + ownerOnly: true }); } run(msg: CommandoMessage) { diff --git a/src/commands/bot/memoryusage.ts b/src/commands/bot/memoryusage.ts index 545edd5..c204454 100644 --- a/src/commands/bot/memoryusage.ts +++ b/src/commands/bot/memoryusage.ts @@ -17,7 +17,12 @@ module.exports = class MemoryUsageBot extends Command { memberName: 'memoryusage', description: 'Checks the current, approximate memory usage of the bot\'s Node.js process.', userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + ownerOnly: true }); } run(msg: CommandoMessage) { diff --git a/src/commands/bot/servercount.ts b/src/commands/bot/servercount.ts new file mode 100644 index 0000000..49fcc5c --- /dev/null +++ b/src/commands/bot/servercount.ts @@ -0,0 +1,29 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import { MessageEmbed } from 'discord.js'; +import emoji from 'emoji-random'; + +module.exports = class ServerCountServer extends Command { + constructor(client) { + super(client, { + name: 'servercount', + aliases: ['sc', 'scount', 'serverc'], + group: 'server', + memberName: 'servercount', + description: 'Tells you the amount of servers uwufy is in.', + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + ownerOnly: true + }); + } + run(msg: CommandoMessage) { + msg.channel.send('Please wait...').then(m => { + m.edit(`** **`); + + let emb = new MessageEmbed() + .setDescription(`Currently running on ${this.client.guilds.cache.size} server(s). ` + emoji.random()) + .setColor(0xFFCC4D) + + msg.channel.send(emb); + }); + } +};
\ No newline at end of file |