diff options
Diffstat (limited to 'src/commands/fun')
| -rw-r--r-- | src/commands/fun/advice.ts | 27 | ||||
| -rw-r--r-- | src/commands/fun/motivate.ts | 2 |
2 files changed, 28 insertions, 1 deletions
diff --git a/src/commands/fun/advice.ts b/src/commands/fun/advice.ts new file mode 100644 index 0000000..49e011c --- /dev/null +++ b/src/commands/fun/advice.ts @@ -0,0 +1,27 @@ +import axios from 'axios' +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; + +module.exports = class AdviceFun extends Command { + constructor(client) { + super(client, { + name: 'advice', + group: 'fun', + memberName: 'advice', + description: 'Gives you a random piece of advice.', + throttling: { + usages: 5, + duration: 30 + }, + examples: [ + 'uwu!advice' + ], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] + }); + } + async run(msg: CommandoMessage) { + let res = await axios.get('http://api.adviceslip.com/advice') + msg.reply(res.data.slip.advice + ' ' + emoji.random()) + } +};
\ No newline at end of file diff --git a/src/commands/fun/motivate.ts b/src/commands/fun/motivate.ts index a0e53e9..3dcd7f6 100644 --- a/src/commands/fun/motivate.ts +++ b/src/commands/fun/motivate.ts @@ -6,7 +6,7 @@ module.exports = class MotivateFun extends Command { constructor(client) { super(client, { name: 'motivate', - aliases: ['motivateme'], + aliases: ['motivateme', 'motivation'], group: 'fun', memberName: 'motivate', description: 'Gives you a random motivating quote from Star Wars.', |