summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-27 17:33:27 -0700
committer8cy <[email protected]>2020-04-27 17:33:27 -0700
commitdf64667168cdc33a2a8ffe2c0fba3b5fc6414520 (patch)
treec9535ffdf33de34bb135e5db86063142e0e81daa /src
parentadd support and embed cmd, v8.0.2 (diff)
downloaddep-core-df64667168cdc33a2a8ffe2c0fba3b5fc6414520.tar.xz
dep-core-df64667168cdc33a2a8ffe2c0fba3b5fc6414520.zip
fix quote commands, add motivate, v8.1.0
Diffstat (limited to 'src')
-rw-r--r--src/bot.ts2
-rw-r--r--src/commands/fun/motivate.ts29
-rw-r--r--src/commands/fun/quote.ts61
-rw-r--r--src/commands/moderation/addrole.ts62
-rw-r--r--src/commands/moderation/removerole.ts60
-rw-r--r--src/config.json2
6 files changed, 136 insertions, 80 deletions
diff --git a/src/bot.ts b/src/bot.ts
index 786ff63..11af17a 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -33,7 +33,7 @@ client.registry
.registerDefaultGroups()
.registerDefaultCommands({
help: true,
- eval: false
+ //eval: false
})
.registerCommandsIn(path.join(__dirname, 'commands'));
diff --git a/src/commands/fun/motivate.ts b/src/commands/fun/motivate.ts
new file mode 100644
index 0000000..a0e53e9
--- /dev/null
+++ b/src/commands/fun/motivate.ts
@@ -0,0 +1,29 @@
+import mq from 'motivations';
+import { Command, CommandoMessage } from 'discord.js-commando';
+import emoji from 'emoji-random';
+
+module.exports = class MotivateFun extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'motivate',
+ aliases: ['motivateme'],
+ group: 'fun',
+ memberName: 'motivate',
+ description: 'Gives you a random motivating quote from Star Wars.',
+ throttling: {
+ usages: 5,
+ duration: 30
+ },
+ examples: [
+ 'uwu!motivate',
+ 'uwu!motivateme'
+ ],
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
+ });
+ }
+ run(msg: CommandoMessage) {
+ var quoteNum = Math.floor((Math.random() * 62) + 1);
+ msg.reply(mq[quoteNum] + ' ' + emoji.random())
+ }
+}; \ No newline at end of file
diff --git a/src/commands/fun/quote.ts b/src/commands/fun/quote.ts
index 0961d1d..81850cb 100644
--- a/src/commands/fun/quote.ts
+++ b/src/commands/fun/quote.ts
@@ -1,4 +1,11 @@
-import atquotes from 'at-quotes';
+// Quote Packages
+import mq from 'popular-movie-quotes';
+import hsq from 'harvey-specter-quotes'
+import aq from 'animequote'
+import cq from 'chewbacca-quotes'
+import asq from 'arnie-quote'
+import lotrq from 'random-lotr-movie-quote'
+
import { Command, CommandoMessage } from 'discord.js-commando';
import emoji from 'emoji-random';
@@ -9,7 +16,7 @@ module.exports = class QuoteFun extends Command {
aliases: ['quotes'],
group: 'fun',
memberName: 'quote',
- description: '[Broken] Gives you a random quote from Adventure Time.',
+ description: 'Gives you a random quote from Adventure Time.',
throttling: {
usages: 5,
duration: 30
@@ -17,13 +24,13 @@ module.exports = class QuoteFun extends Command {
examples: [
'uwu!quote',
'uwu!qutoes',
- 'uwu!quote finn',
- 'uwu!quotes ice king'
+ 'uwu!quote movie',
+ 'uwu!quotes harvey specter'
],
args: [
{
key: 'atCharacter',
- prompt: 'Would you like a specific character? (Finn, Jake, Ice King, No)',
+ prompt: 'Would you like a specific type?\nTypes: movie, harvey specter, anime, chewbacca, arnold schwarzenegger or lotr.',
type: 'string'
}
],
@@ -32,14 +39,42 @@ module.exports = class QuoteFun extends Command {
});
}
run(msg: CommandoMessage, { atCharacter }) {
- if (!atCharacter || atCharacter == 'no' || atCharacter == 'n') {
- msg.reply(atquotes.getQuote() + ' ' + emoji.random());
- } else if (atCharacter == 'finn' || atCharacter == 'f') {
- msg.reply(atquotes.getFinnQuote() + ' ' + emoji.random());
- } else if (atCharacter == 'jake' || atCharacter == 'j') {
- msg.reply(atquotes.getJakeQuote() + ' ' + emoji.random());
- } else if (atCharacter == 'ice king' || atCharacter == 'ik') {
- msg.reply(atquotes.getIceKingQuote() + ' ' + emoji.random());
+ if (atCharacter == 'random' || atCharacter == 'no') {
+ var quoteNum = Math.floor((Math.random() * 6) + 1);
+ switch (quoteNum) {
+ case 1:
+ msg.reply(mq.getRandomQuote() + ' ' + emoji.random());
+ break
+ case 2:
+ msg.reply(hsq.random() + ' ' + emoji.random());
+ break
+ case 3:
+ msg.reply(aq().quotesentence + ' ' + emoji.random());
+ break
+ case 4:
+ msg.reply(cq() + ' ' + emoji.random())
+ break
+ case 5:
+ msg.reply(asq() + ' ' + emoji.random())
+ break
+ case 6:
+ msg.reply(lotrq() + ' ' + emoji.random())
+ break
+ }
+ } else if (atCharacter == 'movie' || atCharacter == 'movies') {
+ msg.reply(mq.getRandomQuote() + ' ' + emoji.random());
+ } else if (atCharacter == 'harvey specter' || atCharacter == 'harvey') {
+ msg.reply(hsq.random() + ' ' + emoji.random());
+ } else if (atCharacter == 'anime' || atCharacter == 'animes') {
+ msg.reply(aq().quotesentence + ' ' + emoji.random());
+ } else if (atCharacter == 'chewbacca') {
+ msg.reply(cq() + ' ' + emoji.random())
+ } else if (atCharacter == 'arnold schwarzenegger' || atCharacter == 'arnold' || atCharacter == 'schwarzenegger') {
+ msg.reply(asq() + ' ' + emoji.random())
+ } else if (atCharacter == 'lotr' || atCharacter == 'lord of the rings') {
+ msg.reply(lotrq() + ' ' + emoji.random())
+ } else {
+ msg.reply('That was not at option. ' + emoji.random())
}
}
}; \ No newline at end of file
diff --git a/src/commands/moderation/addrole.ts b/src/commands/moderation/addrole.ts
index 93645a2..65b8f8b 100644
--- a/src/commands/moderation/addrole.ts
+++ b/src/commands/moderation/addrole.ts
@@ -1,4 +1,5 @@
import { Command, CommandoMessage } from 'discord.js-commando';
+import emoji from 'emoji-random'
module.exports = class AddRoleModeration extends Command {
constructor(client) {
@@ -7,20 +8,19 @@ module.exports = class AddRoleModeration extends Command {
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'
- }
- ],
+ description: '[Disabled] 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'
+ // },
+ // {
+ // 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: [
@@ -37,24 +37,20 @@ module.exports = class AddRoleModeration extends Command {
});
}
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.')
- }
- }
+ msg.reply('Command disabled.')
+ // let role = roleID
+ // console.log('role:', role)
+ // let member = userID
+ // console.log('member:', member)
+ // if (role) {
+ // if (msg.guild.member(member)?.roles.cache.some(role)) {
+ // msg.reply(member + ' already has that role! ' + emoji.random())
+ // } else {
+ // msg.guild.member(member)?.roles.add(role).catch(err => console.log(err))
+ // msg.reply(`The role **${role}** has been added to **${userID}**.`)
+ // }
+ // } else {
+ // msg.reply('The role or user is either non-existant or you might\'ve mispelled it.')
+ // }
}
}; \ No newline at end of file
diff --git a/src/commands/moderation/removerole.ts b/src/commands/moderation/removerole.ts
index d796cb9..104606d 100644
--- a/src/commands/moderation/removerole.ts
+++ b/src/commands/moderation/removerole.ts
@@ -7,19 +7,19 @@ module.exports = class RemoveRoleModeration extends Command {
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'
- }
- ],
+ description: '[Disabled] 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'
+ // }
+ // ],
throttling: {
usages: 5,
duration: 30
@@ -36,24 +36,20 @@ module.exports = class RemoveRoleModeration extends Command {
});
}
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.')
- }
- }
+ msg.reply('Command disabled.')
+ // let role = roleID
+ // console.log('role:', role)
+ // let member = userID
+ // console.log('member:', member)
+ // if (role) {
+ // if (msg.guild.member(member)?.roles.cache.some(role)) {
+ // msg.reply(member + ' already has that role! ' + emoji.random())
+ // } else {
+ // msg.guild.member(member)?.roles.remove(role).catch(err => console.log(err))
+ // msg.reply(`The role **${role}** has been remove from **${userID}**.`)
+ // }
+ // } else {
+ // msg.reply('The role or user is either non-existant or you might\'ve mispelled it.')
+ // }
}
}; \ No newline at end of file
diff --git a/src/config.json b/src/config.json
index 7ec7634..8dc568b 100644
--- a/src/config.json
+++ b/src/config.json
@@ -1,5 +1,5 @@
{
"secret":"Njk5NDczMjYzOTk4MjcxNDg5.XpU5oQ.btZuxVudhNllSQY6CxrXXtMJm9A",
"yt-api-key":"AIzaSyCeG1lQAeInv4vjFv_eTL9IFAFNdQC9Nk8",
- "version":"8.0.2"
+ "version":"8.1.0"
} \ No newline at end of file