From d39052e139057b8303d79bb4192f677879797c92 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Thu, 7 May 2020 14:53:02 -0700 Subject: add cmd logging and join server logging to support server - add depreciated join cmd *lol* - fix some formatting in btc and add defaults - add zero two cmd - add fortnite alias to fortnitestats --- src/commands/bot/test.ts | 23 +++++++++++++++++++++++ src/commands/crypto/btc.ts | 5 +++-- src/commands/crypto/btcchange.ts | 3 ++- src/commands/utility/fortnitestats.ts | 3 ++- src/commands/voice/join.ts | 23 +++++++++++++++++++++++ src/commands/zerotwo/zerotwo.ts | 26 ++++++++++++++++++++++++++ 6 files changed, 79 insertions(+), 4 deletions(-) create mode 100644 src/commands/bot/test.ts create mode 100644 src/commands/voice/join.ts create mode 100644 src/commands/zerotwo/zerotwo.ts (limited to 'src/commands') diff --git a/src/commands/bot/test.ts b/src/commands/bot/test.ts new file mode 100644 index 0000000..8140c6e --- /dev/null +++ b/src/commands/bot/test.ts @@ -0,0 +1,23 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; + +module.exports = class TestBot extends Command { + constructor(client) { + super(client, { + name: 'test', + group: 'bot', + memberName: 'test', + description: 'Do not test in production!', + examples: ['uwu!test'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + } + }); + } + run(msg: CommandoMessage) { + msg.reply(`Do not test in production! ${emoji.random()}`) + } +}; \ No newline at end of file diff --git a/src/commands/crypto/btc.ts b/src/commands/crypto/btc.ts index 5fd5f67..596b9e4 100644 --- a/src/commands/crypto/btc.ts +++ b/src/commands/crypto/btc.ts @@ -15,7 +15,8 @@ module.exports = class BTCCrypto extends Command { { key: 'currencyName', prompt: 'What currency could you like to see it in? (USD, AUD, CAD, etc.)', - type: 'string' + type: 'string', + default: 'USD' } ], examples: [ @@ -34,7 +35,7 @@ module.exports = class BTCCrypto extends Command { run(msg: CommandoMessage, { currencyName }) { currencyName = currencyName.toUpperCase(); btc({ isDecimal: true, currencyCode: currencyName }).then(value => { - msg.reply('The current price of *Bitcoin* in **' + currencyName + '** is **' + value + '**. ' + emoji.random()); + msg.reply(`The current price of *Bitcoin* is **${value} ${currencyName}**. ${emoji.random()}`); }); } }; \ No newline at end of file diff --git a/src/commands/crypto/btcchange.ts b/src/commands/crypto/btcchange.ts index 4218c31..f0b05b0 100644 --- a/src/commands/crypto/btcchange.ts +++ b/src/commands/crypto/btcchange.ts @@ -15,7 +15,8 @@ module.exports = class BTCChangeCrypto extends Command { { key: 'timeAmount', prompt: 'What time range do you want to check the fluction amount in? (day, hour, week)', - type: 'string' + type: 'string', + default: 'USD' } ], throttling: { diff --git a/src/commands/utility/fortnitestats.ts b/src/commands/utility/fortnitestats.ts index 84e0115..01f1f99 100644 --- a/src/commands/utility/fortnitestats.ts +++ b/src/commands/utility/fortnitestats.ts @@ -18,7 +18,8 @@ module.exports = class FortniteStatsUtility extends Command { 'fnstatistics', 'fn-statistics', 'fns', - 'fn-s' + 'fn-s', + 'fortnite' ], group: 'utility', memberName: 'fortnitestats', diff --git a/src/commands/voice/join.ts b/src/commands/voice/join.ts new file mode 100644 index 0000000..07e00db --- /dev/null +++ b/src/commands/voice/join.ts @@ -0,0 +1,23 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; + +module.exports = class JoinVoice extends Command { + constructor(client) { + super(client, { + name: 'join', + group: 'voice', + memberName: 'join', + description: 'Tells uwufier to join your voice channel.', + examples: ['uwu!join'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + } + }); + } + run(msg: CommandoMessage) { + msg.reply(`\`uwu!join\` has been depricated in favour of a simpler user expirience. Uwufier will now join your channel whenever you request to play something with \`uwu!play\`! ${emoji.random()}`) + } +}; \ No newline at end of file diff --git a/src/commands/zerotwo/zerotwo.ts b/src/commands/zerotwo/zerotwo.ts new file mode 100644 index 0000000..84a465d --- /dev/null +++ b/src/commands/zerotwo/zerotwo.ts @@ -0,0 +1,26 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +// @ts-ignore no types +import emoji from 'emoji-random'; + +module.exports = class ZeroTwoZeroTwo extends Command { + constructor(client) { + super(client, { + name: 'zerotwo', + group: 'zerotwo', + memberName: 'zerotwo', + description: 'Zero Two.', + examples: [ + 'uwu!zerotwo' + ], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + msg.reply(`Zero Two is the best waifu of all, literally no one else can compare. Unironically she is the best waifu of all time. Literally praise her. This is not a joke she is literally the best. ${emoji.random()}`) + } +}; \ No newline at end of file -- cgit v1.2.3