summaryrefslogtreecommitdiff
path: root/src/commands/fun/cow.ts
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-23 19:06:09 -0700
committer8cy <[email protected]>2020-04-23 19:06:09 -0700
commit8a2c9df3fd75a08d2b4acabe0b3a6bd62da22b34 (patch)
tree08e8b18aebae0b3836de94484185fabb14a860e8 /src/commands/fun/cow.ts
parentchange mongdburl to mlab, v7.4.2 (diff)
downloaddep-core-8a2c9df3fd75a08d2b4acabe0b3a6bd62da22b34.tar.xz
dep-core-8a2c9df3fd75a08d2b4acabe0b3a6bd62da22b34.zip
shift groups around, new mod cmds, v7.5.0
Diffstat (limited to 'src/commands/fun/cow.ts')
-rw-r--r--src/commands/fun/cow.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/commands/fun/cow.ts b/src/commands/fun/cow.ts
new file mode 100644
index 0000000..e8fa60b
--- /dev/null
+++ b/src/commands/fun/cow.ts
@@ -0,0 +1,26 @@
+import { Command, CommandoMessage } from 'discord.js-commando';
+import cows from 'cows';
+
+module.exports = class CowFun extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'cow',
+ aliases: ['cows'],
+ group: 'fun',
+ memberName: 'cow',
+ description: 'Gives you a random cow.',
+ throttling: {
+ usages: 5,
+ duration: 30
+ },
+ examples: ['uwu!cow', 'uwu!cows'],
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY']
+ });
+ }
+ run(msg: CommandoMessage) {
+ let cowNumber = Math.round((Math.random() * cows().length))
+ let cow = cows()[cowNumber]
+ msg.reply(`\`\`\`${cow}\`\`\``);
+ }
+}; \ No newline at end of file