From c6d45a94b0e3bbcb0b2e01ed8e35428040126c45 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Tue, 28 Apr 2020 13:16:40 -0700 Subject: The Return, v8.2.0 - add goodbye - add avatar alias to pfp - add rule34, gelbooru and danbooru - fix ban and kick - add advice - add motivation alias to motivate --- src/commands/fun/advice.ts | 27 +++++++++++++++++++++++++++ src/commands/fun/motivate.ts | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/commands/fun/advice.ts (limited to 'src/commands/fun') 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.', -- cgit v1.2.3