diff options
| author | 8cy <[email protected]> | 2020-04-23 19:06:09 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-23 19:06:09 -0700 |
| commit | 8a2c9df3fd75a08d2b4acabe0b3a6bd62da22b34 (patch) | |
| tree | 08e8b18aebae0b3836de94484185fabb14a860e8 /src | |
| parent | change mongdburl to mlab, v7.4.2 (diff) | |
| download | dep-core-8a2c9df3fd75a08d2b4acabe0b3a6bd62da22b34.tar.xz dep-core-8a2c9df3fd75a08d2b4acabe0b3a6bd62da22b34.zip | |
shift groups around, new mod cmds, v7.5.0
Diffstat (limited to 'src')
| -rw-r--r-- | src/bot.ts | 5 | ||||
| -rw-r--r-- | src/commands/bot/clientid.ts (renamed from src/commands/utility/clientid.ts) | 4 | ||||
| -rw-r--r-- | src/commands/bot/invite.ts (renamed from src/commands/utility/invite.ts) | 7 | ||||
| -rw-r--r-- | src/commands/bot/memorystats.ts (renamed from src/commands/utility/memorystats.ts) | 4 | ||||
| -rw-r--r-- | src/commands/bot/memoryusage.ts (renamed from src/commands/utility/memoryusage.ts) | 4 | ||||
| -rw-r--r-- | src/commands/bot/uptime.ts (renamed from src/commands/utility/uptime.ts) | 4 | ||||
| -rw-r--r-- | src/commands/bot/version.ts (renamed from src/commands/utility/version.ts) | 4 | ||||
| -rw-r--r-- | src/commands/crypto/btc.ts | 4 | ||||
| -rw-r--r-- | src/commands/crypto/btcchange.ts | 4 | ||||
| -rw-r--r-- | src/commands/fun/cow.ts | 26 | ||||
| -rw-r--r-- | src/commands/fun/dicksize.ts | 33 | ||||
| -rw-r--r-- | src/commands/fun/quote.ts | 2 | ||||
| -rw-r--r-- | src/commands/moderation/addrole.ts | 55 | ||||
| -rw-r--r-- | src/commands/moderation/ban.ts | 25 | ||||
| -rw-r--r-- | src/commands/moderation/clear.ts (renamed from src/commands/utility/clear.ts) | 4 | ||||
| -rw-r--r-- | src/commands/moderation/kick.ts | 29 | ||||
| -rw-r--r-- | src/commands/moderation/removerole.ts | 54 | ||||
| -rw-r--r-- | src/commands/server/membercount.ts (renamed from src/commands/utility/membercount.ts) | 4 | ||||
| -rw-r--r-- | src/commands/server/pfp.ts | 27 | ||||
| -rw-r--r-- | src/commands/server/server.ts (renamed from src/commands/utility/server.ts) | 4 | ||||
| -rw-r--r-- | src/commands/server/servercount.ts (renamed from src/commands/utility/servercount.ts) | 4 | ||||
| -rw-r--r-- | src/commands/zerotwo/darling.ts | 6 | ||||
| -rw-r--r-- | src/config.json | 2 |
23 files changed, 284 insertions, 31 deletions
@@ -31,12 +31,13 @@ client.registry .registerGroups([ ['fun', 'Fun Command Group'], ['moderation', 'Moderation Command Group'], - ['utility', 'Utility Command Group'], + ['server', 'Server Command Group'], ['voice', 'Voice Command Group'], ['nsfw', 'NSFW Command Group'], ['anime', 'Anime Command Group'], ['crypto', 'Crypto Command Group'], - ['zerotwo', 'Zero Two Command Group'] + ['zerotwo', 'Zero Two Command Group'], + ['bot', 'Bot COmmand Group'] ]) .registerDefaultGroups() .registerDefaultCommands({ diff --git a/src/commands/utility/clientid.ts b/src/commands/bot/clientid.ts index 28073c5..da7717e 100644 --- a/src/commands/utility/clientid.ts +++ b/src/commands/bot/clientid.ts @@ -2,12 +2,12 @@ import { Command, CommandoMessage } from 'discord.js-commando'; import emoji from 'emoji-random'; import { MessageEmbed } from 'discord.js'; -module.exports = class ClientIDUtility extends Command { +module.exports = class ClientIDBot extends Command { constructor(client) { super(client, { name: 'clientid', aliases: ['cid'], - group: 'utility', + group: 'bot', memberName: 'clientid', description: 'Tells you the bot\'s client ID version.', examples: ['uwu!clientid', 'uwu!cid'], diff --git a/src/commands/utility/invite.ts b/src/commands/bot/invite.ts index 4e8150e..8c798d1 100644 --- a/src/commands/utility/invite.ts +++ b/src/commands/bot/invite.ts @@ -1,13 +1,12 @@ import { Command, CommandoMessage } from 'discord.js-commando'; import emoji from 'emoji-random'; -import { MessageEmbed } from 'discord.js'; -module.exports = class InviteUtility extends Command { +module.exports = class InviteBot extends Command { constructor(client) { super(client, { name: 'invite', aliases: ['inv'], - group: 'utility', + group: 'bot', memberName: 'invite', description: 'Gives you the bot\'s invite link.', examples: ['uwu!invite', 'uwu!inv'], @@ -16,6 +15,6 @@ module.exports = class InviteUtility extends Command { }); } run(msg: CommandoMessage) { - msg.reply('https://crack.cf/uwu') + msg.reply('https://crack.cf/uwu ' + emoji.random()) } };
\ No newline at end of file diff --git a/src/commands/utility/memorystats.ts b/src/commands/bot/memorystats.ts index 0729fc5..669ac84 100644 --- a/src/commands/utility/memorystats.ts +++ b/src/commands/bot/memorystats.ts @@ -1,6 +1,6 @@ import { Command, CommandoMessage } from 'discord.js-commando'; -module.exports = class MemoryStatsUtility extends Command { +module.exports = class MemoryStatsBot extends Command { constructor(client) { super(client, { name: 'memorystats', @@ -14,7 +14,7 @@ module.exports = class MemoryStatsUtility extends Command { 'memory-stat', 'memorystat' ], - group: 'utility', + group: 'bot', memberName: 'memorystats', description: 'Checks the full, current, approximate memory usage statistics of the bot\'s Node.js process.', userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], diff --git a/src/commands/utility/memoryusage.ts b/src/commands/bot/memoryusage.ts index 3c2913a..545edd5 100644 --- a/src/commands/utility/memoryusage.ts +++ b/src/commands/bot/memoryusage.ts @@ -1,7 +1,7 @@ import { Command, CommandoMessage } from 'discord.js-commando'; import emoji from 'emoji-random'; -module.exports = class MemoryUsageUtility extends Command { +module.exports = class MemoryUsageBot extends Command { constructor(client) { super(client, { name: 'memoryusage', @@ -13,7 +13,7 @@ module.exports = class MemoryUsageUtility extends Command { 'memory', 'memoryusage' ], - group: 'utility', + group: 'bot', memberName: 'memoryusage', description: 'Checks the current, approximate memory usage of the bot\'s Node.js process.', userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], diff --git a/src/commands/utility/uptime.ts b/src/commands/bot/uptime.ts index dcce606..3280d9e 100644 --- a/src/commands/utility/uptime.ts +++ b/src/commands/bot/uptime.ts @@ -4,12 +4,12 @@ import 'moment-duration-format'; import emoji from 'emoji-random'; import { MessageEmbed } from 'discord.js'; -export default class UptimeUtility extends Command { +export default class UptimeBot extends Command { constructor(client) { super(client, { name: 'uptime', aliases: ['ut'], - group: 'utility', + group: 'bot', memberName: 'uptime', description: 'Tells you how long the bot has been online.', throttling: { diff --git a/src/commands/utility/version.ts b/src/commands/bot/version.ts index 0de170f..7d2c71b 100644 --- a/src/commands/utility/version.ts +++ b/src/commands/bot/version.ts @@ -3,11 +3,11 @@ import emoji from 'emoji-random'; import { MessageEmbed } from 'discord.js'; import config from '../../config.json'; -export default class VersionUtility extends Command { +export default class VersionBot extends Command { constructor(client) { super(client, { name: 'version', - group: 'utility', + group: 'bot', memberName: 'version', description: 'Tells you the bot\'s current build version.', throttling: { diff --git a/src/commands/crypto/btc.ts b/src/commands/crypto/btc.ts index 1c467ab..3f3ffe9 100644 --- a/src/commands/crypto/btc.ts +++ b/src/commands/crypto/btc.ts @@ -3,12 +3,12 @@ import emoji from 'emoji-random'; import btc from 'btc-value'; btc.setApiKey('a43419ce-fc59-4951-8af9-20c5e36ef73f'); -module.exports = class BTCUtility extends Command { +module.exports = class BTCCrypto extends Command { constructor(client) { super(client, { name: 'btc', aliases: ['bitcoin', 'crypto'], - group: 'utility', + group: 'crypto', memberName: 'btc', description: 'Allows you to check the current Bitcoin price.', args: [ diff --git a/src/commands/crypto/btcchange.ts b/src/commands/crypto/btcchange.ts index 9ef5d4d..67eb0c7 100644 --- a/src/commands/crypto/btcchange.ts +++ b/src/commands/crypto/btcchange.ts @@ -3,12 +3,12 @@ import btc from 'btc-value'; import emoji from 'emoji-random'; btc.setApiKey('a43419ce-fc59-4951-8af9-20c5e36ef73f'); -module.exports = class BTCChangeUtility extends Command { +module.exports = class BTCChangeCrypto extends Command { constructor(client) { super(client, { name: 'btcchange', aliases: ['bitcoinchange', 'cryptochange', 'btcc'], - group: 'utility', + group: 'crypto', memberName: 'btcchange', description: 'Allows you to check the fluctuation in Bitcoin prices within a specified amount of time.', args: [ diff --git a/src/commands/fun/cow.ts b/src/commands/fun/cow.ts new file mode 100644 index 0000000..e8fa60b --- /dev/null +++ b/src/commands/fun/cow.ts @@ -0,0 +1,26 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import cows from 'cows'; + +module.exports = class CowFun extends Command { + constructor(client) { + super(client, { + name: 'cow', + aliases: ['cows'], + group: 'fun', + memberName: 'cow', + description: 'Gives you a random cow.', + throttling: { + usages: 5, + duration: 30 + }, + examples: ['uwu!cow', 'uwu!cows'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] + }); + } + run(msg: CommandoMessage) { + let cowNumber = Math.round((Math.random() * cows().length)) + let cow = cows()[cowNumber] + msg.reply(`\`\`\`${cow}\`\`\``); + } +};
\ No newline at end of file diff --git a/src/commands/fun/dicksize.ts b/src/commands/fun/dicksize.ts new file mode 100644 index 0000000..9e023d1 --- /dev/null +++ b/src/commands/fun/dicksize.ts @@ -0,0 +1,33 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; + +module.exports = class DickSizeFun extends Command { + constructor(client) { + super(client, { + name: 'dicksize', + aliases: [ + 'peepeesize', + 'ppsize' + ], + group: 'fun', + memberName: 'dicksize', + description: 'Tells you your dick size.', + examples: [ + 'uwu!dicksize', + 'uwu!peepeesize', + 'uwu!ppsize' + ], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] + }); + } + run(msg: CommandoMessage) { + let size = msg.author.id.slice(-3) % 20 + 1 + + msg.reply('Scanning..').then(scanningMsg => { + // @ts-ignore + scanningMsg.delete() + msg.reply('Your dick size is **' + size + '** inches. ' + emoji.random()); + }); + } +};
\ No newline at end of file diff --git a/src/commands/fun/quote.ts b/src/commands/fun/quote.ts index 1e130a8..0961d1d 100644 --- a/src/commands/fun/quote.ts +++ b/src/commands/fun/quote.ts @@ -9,7 +9,7 @@ module.exports = class QuoteFun extends Command { aliases: ['quotes'], group: 'fun', memberName: 'quote', - description: 'Gives you a random quote from Adventure Time.', + description: '[Broken] Gives you a random quote from Adventure Time.', throttling: { usages: 5, duration: 30 diff --git a/src/commands/moderation/addrole.ts b/src/commands/moderation/addrole.ts new file mode 100644 index 0000000..ac0dbb6 --- /dev/null +++ b/src/commands/moderation/addrole.ts @@ -0,0 +1,55 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; + +module.exports = class AddRoleModeration extends Command { + constructor(client) { + super(client, { + name: 'addrole', + aliases: ['roleadd'], + group: 'moderation', + memberName: 'addrole', + description: 'Adds a role to a specific user.', + args: [ + { + key: 'userID', + prompt: 'Who would you like to add the role to? (@someone or myself)', + type: 'string', + default: '' + }, + { + key: 'roleID', + prompt: 'What role would you like to add?', + type: 'string' + } + ], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'], + examples: [ + 'uwu!addrole @CoolRole', + 'uwu!addrole @sin#1337 @CoolRole', + 'uwu!roleadd @sin#1337', + 'uwu!roleadd @sin#1337 @CoolerRole' + ] + }); + } + run(msg: CommandoMessage, { userID, roleID }) { + let role = msg.guild.roles.cache.find(role => role === roleID); + let member = msg.mentions.members?.first(); + if (!userID) { + if (role) { + console.log(role) + member?.roles.add(role) + msg.reply(`The role **${role}** has been added to **${member}**.`) + } else { + msg.reply('Role is either non-existant or you might\'ve mispelled it.') + } + } else if (userID) { + if (role) { + console.log(role) + member?.roles.add(role) + } else { + console.log(role) + msg.reply('Role is either non-existant or you might\'ve mispelled it.') + } + } + } +};
\ No newline at end of file diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts new file mode 100644 index 0000000..45f5298 --- /dev/null +++ b/src/commands/moderation/ban.ts @@ -0,0 +1,25 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; + +module.exports = class BanModeration extends Command { + constructor(client) { + super(client, { + name: 'ban', + aliases: ['banuser', 'ban-user'], + group: 'moderation', + memberName: 'ban', + description: 'Ban someone.', + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'], + examples: ['uwu!ban @sin#1337'] + }); + } + run(msg: CommandoMessage) { + let userID = msg.mentions.members?.first().id + if (!msg.guild.member(userID)) { + msg.reply('Member does not exist in server.') + } else { + msg.guild.members.ban(userID) + msg.say(`User **${userID}** has been banned!`) + } + } +};
\ No newline at end of file diff --git a/src/commands/utility/clear.ts b/src/commands/moderation/clear.ts index 80e0c73..e83d023 100644 --- a/src/commands/utility/clear.ts +++ b/src/commands/moderation/clear.ts @@ -1,12 +1,12 @@ import { Command, CommandoMessage } from 'discord.js-commando'; import emoji from 'emoji-random'; -module.exports = class ClearUtility extends Command { +module.exports = class ClearBot extends Command { constructor(client) { super(client, { name: 'clear', aliases: ['delete', 'del', 'c', 'd'], - group: 'utility', + group: 'bot', memberName: 'clear', description: 'Clears a specified amount of messages.', guildOnly: true, diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts new file mode 100644 index 0000000..24b669d --- /dev/null +++ b/src/commands/moderation/kick.ts @@ -0,0 +1,29 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; + +module.exports = class KickModeration extends Command { + constructor(client) { + super(client, { + name: 'kick', + aliases: ['kickuser', 'kick-user'], + group: 'moderation', + memberName: 'kick', + description: 'Kick someone.', + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'], + examples: [ + 'uwu!kick @sin#1337', + 'uwu!kickuser @sin#1337', + 'uwu!kick-user @sin#1337' + ] + }); + } + run(msg: CommandoMessage) { + let userID = msg.mentions.members?.first().id + if (!msg.guild.member(userID)) { + msg.reply('Member does not exist in server.') + } else { + msg.guild.members.prune(userID) + msg.say(`User **${userID}** has been kicked!`) + } + } +};
\ No newline at end of file diff --git a/src/commands/moderation/removerole.ts b/src/commands/moderation/removerole.ts new file mode 100644 index 0000000..a4edc92 --- /dev/null +++ b/src/commands/moderation/removerole.ts @@ -0,0 +1,54 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; + +module.exports = class RemoveRoleModeration extends Command { + constructor(client) { + super(client, { + name: 'removerole', + aliases: ['roleremove'], + group: 'moderation', + memberName: 'removerole', + description: 'Removes a role to a specific user.', + args: [ + { + key: 'userID', + prompt: 'Who would you like to remove the role from? (@someone or myself)', + type: 'string' + }, + { + key: 'roleID', + prompt: 'What role would you like to remove?', + type: 'string' + } + ], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'BAN_MEMBERS'], + examples: [ + 'uwu!removerole @CoolRole', + 'uwu!removerole @sin#1337 @CoolRole', + 'uwu!roleremove @sin#1337', + 'uwu!roleremove @sin#1337 @CoolerRole' + ] + }); + } + run(msg: CommandoMessage, { userID, roleID }) { + let role = msg.guild.roles.cache.find(r => r.id === roleID); + let member = msg.mentions.members?.first(); + if (!userID) { + if (role) { + console.log(role) + member?.roles.remove(role) + msg.reply(`The role **${role}** has been remove from **${member}**.`) + } else { + console.log(role) + msg.reply('Role is either non-existant or you might\'ve mispelled it.') + } + } else if (!userID) { + if (roleID) { + member?.roles.remove(roleID) + } else { + console.log(roleID) + msg.reply('Role is either non-existant or you might\'ve mispelled it.') + } + } + } +};
\ No newline at end of file diff --git a/src/commands/utility/membercount.ts b/src/commands/server/membercount.ts index 4d64f5d..f3fd2ee 100644 --- a/src/commands/utility/membercount.ts +++ b/src/commands/server/membercount.ts @@ -1,12 +1,12 @@ import { Command, CommandoMessage } from 'discord.js-commando'; import emoji from 'emoji-random'; -module.exports = class MemberCountUtility extends Command { +module.exports = class MemberCountServer extends Command { constructor(client) { super(client, { name: 'membercount', aliases: ['memberc', 'mcount', 'mc'], - group: 'utility', + group: 'server', memberName: 'membercount', description: 'Tells you how many members are in the current server.', throttling: { diff --git a/src/commands/server/pfp.ts b/src/commands/server/pfp.ts new file mode 100644 index 0000000..6d7ce73 --- /dev/null +++ b/src/commands/server/pfp.ts @@ -0,0 +1,27 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; + +module.exports = class PFPServer extends Command { + constructor(client) { + super(client, { + name: 'pfp', + aliases: ['profilepicture', 'profile-picture', 'profileimage', 'profile-image'], + group: 'server', + memberName: 'pfp', + description: 'Grabs the profile picture of a given user.', + args: [ + { + key: 'userID', + prompt: 'Which user\'s profile picture would you like to grab?', + type: 'string' + } + ], + examples: ['uwu!pfp @sin#1337'] + }); + } + run(msg: CommandoMessage, { userID } ) { + userID = msg.mentions.users.first()?.id; + this.client.users.fetch(userID).then(user => { + msg.reply({ files: [user.avatarURL()] }) + }) + } +};
\ No newline at end of file diff --git a/src/commands/utility/server.ts b/src/commands/server/server.ts index f5fddca..6758d24 100644 --- a/src/commands/utility/server.ts +++ b/src/commands/server/server.ts @@ -1,7 +1,7 @@ import { Command, CommandoMessage } from 'discord.js-commando'; import { MessageEmbed } from 'discord.js'; -module.exports = class ServerUtility extends Command { +module.exports = class ServerServer extends Command { constructor(client) { super(client, { name: 'server', @@ -12,7 +12,7 @@ module.exports = class ServerUtility extends Command { 'serverstats', 'server-stats' ], - group: 'utility', + group: 'server', memberName: 'server', description: 'Gives you information about the current server.', throttling: { diff --git a/src/commands/utility/servercount.ts b/src/commands/server/servercount.ts index eaccd89..4690caa 100644 --- a/src/commands/utility/servercount.ts +++ b/src/commands/server/servercount.ts @@ -2,12 +2,12 @@ import { Command, CommandoMessage } from 'discord.js-commando'; import { MessageEmbed } from 'discord.js'; import emoji from 'emoji-random'; -module.exports = class ServerCountUtility extends Command { +module.exports = class ServerCountServer extends Command { constructor(client) { super(client, { name: 'servercount', aliases: ['sc', 'scount', 'serverc'], - group: 'utility', + group: 'server', memberName: 'servercount', description: 'Tells you the amount of servers uwufy is in.', userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], diff --git a/src/commands/zerotwo/darling.ts b/src/commands/zerotwo/darling.ts index 9cb5a17..3b7517e 100644 --- a/src/commands/zerotwo/darling.ts +++ b/src/commands/zerotwo/darling.ts @@ -12,7 +12,11 @@ module.exports = class DarlingZeroTwo extends Command { description: 'Get\'s or sets uwufier\'s current darling.', userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], - examples: ['uwu!darling'], + examples: [ + 'uwu!darling', + 'uwu!darling set', + 'uwu!darling remove' + ], args: [ { key: 'darlingName', diff --git a/src/config.json b/src/config.json index 015fb11..57d6d07 100644 --- a/src/config.json +++ b/src/config.json @@ -1,5 +1,5 @@ { "secret":"Njk5NDczMjYzOTk4MjcxNDg5.XpU5oQ.btZuxVudhNllSQY6CxrXXtMJm9A", "yt-api-key":"AIzaSyCeG1lQAeInv4vjFv_eTL9IFAFNdQC9Nk8", - "version":"7.4.2" + "version":"7.5.0" }
\ No newline at end of file |