summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
author8cy <[email protected]>2020-07-07 03:55:21 -0700
committer8cy <[email protected]>2020-07-07 03:55:21 -0700
commit385b0960abdc8bb13172330a973dafd56560cf8d (patch)
tree86e85d23404a5170ffbf870a6faeba77b3430e0e /src/commands
parentadd fanart for emma :star2: (diff)
downloaddep-core-385b0960abdc8bb13172330a973dafd56560cf8d.tar.xz
dep-core-385b0960abdc8bb13172330a973dafd56560cf8d.zip
big cool :star:
- add commenting to bot.ts - add types to most of the voice commands - add art and verify cmd for emma - add roastwilly cmd - fix rp cmd formatting
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/emma/art.ts2
-rw-r--r--src/commands/emma/verify.ts54
-rw-r--r--src/commands/fun/insult.ts2
-rw-r--r--src/commands/fun/roastwilly.ts45
-rw-r--r--src/commands/fun/roastwillyc.ts36
-rw-r--r--src/commands/roleplay/blush.ts2
-rw-r--r--src/commands/roleplay/celebrate.ts2
-rw-r--r--src/commands/roleplay/eat.ts2
-rw-r--r--src/commands/roleplay/fistbump.ts2
-rw-r--r--src/commands/roleplay/highfive.ts2
-rw-r--r--src/commands/roleplay/holdhands.ts2
-rw-r--r--src/commands/roleplay/hug.ts2
-rw-r--r--src/commands/roleplay/inhale.ts2
-rw-r--r--src/commands/roleplay/kill.ts2
-rw-r--r--src/commands/roleplay/kiss.ts2
-rw-r--r--src/commands/roleplay/pat.ts2
-rw-r--r--src/commands/roleplay/poke.ts2
-rw-r--r--src/commands/roleplay/punch.ts2
-rw-r--r--src/commands/roleplay/slap.ts2
-rw-r--r--src/commands/roleplay/sleep.ts2
-rw-r--r--src/commands/roleplay/wakeup.ts2
-rw-r--r--src/commands/roleplay/wave.ts2
-rw-r--r--src/commands/roleplay/wink.ts2
-rw-r--r--src/commands/voice/abee.ts1
-rw-r--r--src/commands/voice/itemshop.ts4
-rw-r--r--src/commands/voice/join.ts6
-rw-r--r--src/commands/voice/leave.ts17
-rw-r--r--src/commands/voice/loop.ts20
-rw-r--r--src/commands/voice/minecraft.ts1
-rw-r--r--src/commands/voice/pause.ts15
-rw-r--r--src/commands/voice/play.ts1
-rw-r--r--src/commands/voice/psycho.ts1
-rw-r--r--src/commands/voice/queue.ts9
-rw-r--r--src/commands/voice/remove.ts17
-rw-r--r--src/commands/voice/resume.ts14
-rw-r--r--src/commands/voice/shuffle.ts20
-rw-r--r--src/commands/voice/skip.ts15
-rw-r--r--src/commands/voice/skipall.ts17
-rw-r--r--src/commands/voice/skipto.ts20
-rw-r--r--src/commands/voice/volume.ts21
40 files changed, 280 insertions, 94 deletions
diff --git a/src/commands/emma/art.ts b/src/commands/emma/art.ts
index ee8c451..9465fb2 100644
--- a/src/commands/emma/art.ts
+++ b/src/commands/emma/art.ts
@@ -193,6 +193,8 @@ module.exports = class ArtEmma extends Command {
})
}
})
+ } else if (type == 'admin-test') {
+ return msg.reply('**ADMIN INFO:** Art channel bound.')
}
/* else {
diff --git a/src/commands/emma/verify.ts b/src/commands/emma/verify.ts
new file mode 100644
index 0000000..6f4584a
--- /dev/null
+++ b/src/commands/emma/verify.ts
@@ -0,0 +1,54 @@
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
+import emoji from 'emoji-random';
+import Verify from '../../models/Verify';
+import mongo from 'mongoose';
+import config from '../../config.json';
+mongo.connect(config['mongodburi'], { useNewUrlParser: true, useUnifiedTopology: true })
+
+module.exports = class VerifyEmma extends Command {
+ constructor(client: CommandoClient) {
+ super(client, {
+ name: 'verify',
+ group: 'emma',
+ memberName: 'verify',
+ description: 'Lists all the roles on the current server.',
+ examples: ['uwu!verify set', 'uwu!verify remove'],
+ throttling: {
+ usages: 5,
+ duration: 30
+ },
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ guildOnly: true,
+ args: [
+ {
+ key: 'code',
+ prompt: 'What is the verification code?',
+ type: 'string'
+ }
+ ]
+ });
+ }
+ //@ts-ignore this ok
+ async run(msg: CommandoMessage, { code }: any) {
+ if (msg.guild.id == '704032355987488791') return msg.reply(`You are not submitting from **Kat\'s Korner**! ${emoji.random()}`);
+ Verify.findOne({ userID: msg.author.id }, async (error, member) => {
+ if (error) return console.error(error)
+ //@ts-ignore this exists
+ if (msg.author.id == member.userID) {
+ //@ts-ignore this in-fact
+ if (code == member.key) {
+ await Verify.findOneAndDelete({ userID: msg.author.id });
+ const unverRole = '729928740359897101';
+ return msg.guild.member(msg.author.id)?.roles.remove(unverRole);
+ } else {
+ //@ts-ignore this exists
+ return msg.author.send(`That is not the correct key! Please try again with the correct key: \`${member.key}\`. ${emoji.random()}`);
+ }
+ } else {
+ return msg.author.send(`You are already verified! ${emoji.random()}`)
+ }
+ })
+ }
+}; \ No newline at end of file
diff --git a/src/commands/fun/insult.ts b/src/commands/fun/insult.ts
index ac163cc..47643e7 100644
--- a/src/commands/fun/insult.ts
+++ b/src/commands/fun/insult.ts
@@ -6,7 +6,7 @@ module.exports = class InsultFun extends Command {
constructor(client) {
super(client, {
name: 'insult',
- aliases: ['insults'],
+ aliases: ['insults', 'roast', 'roasts'],
group: 'fun',
memberName: 'insult',
description: 'Gives you a random insult.',
diff --git a/src/commands/fun/roastwilly.ts b/src/commands/fun/roastwilly.ts
new file mode 100644
index 0000000..24503cd
--- /dev/null
+++ b/src/commands/fun/roastwilly.ts
@@ -0,0 +1,45 @@
+import { Command, CommandoMessage } from 'discord.js-commando';
+import insult from 'insult';
+import emoji from 'emoji-random';
+
+module.exports = class RoastWillyFun extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'roastwilly',
+ aliases: ['insultwilly'],
+ group: 'fun',
+ memberName: 'roastwilly',
+ description: 'Gives you a random insult directed towards willy.',
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ throttling: {
+ usages: 5,
+ duration: 30
+ },
+ examples: ['uwu!insultwilly', 'uwu!roastwilly'],
+ args: [
+ {
+ key: 'type',
+ prompt: 'None',
+ type: 'string',
+ default: ''
+ }
+ ]
+ });
+ }
+ run(msg: CommandoMessage, { type }: any) {
+ const willysRoasts = ['you smell like weenie water', 'you are dead built like a german sausage', 'you are that one flavour of ice cream no one eats'];
+ const roastCustomBool = Math.floor(Math.random() * 3);
+ if (type == 'custom' || type == 'c') {
+ const customRoastNum = Math.floor(Math.random() * willysRoasts.length);
+ msg.reply(`${willysRoasts[customRoastNum]} <@${msg.guild.member('608481389444333583')?.id}> ${emoji.random()}`)
+ } else {
+ if (roastCustomBool == 1) {
+ const customRoastNum = Math.floor(Math.random() * willysRoasts.length);
+ msg.reply(`${willysRoasts[customRoastNum]} <@${msg.guild.member('608481389444333583')?.id}> ${emoji.random()}`)
+ } else {
+ msg.reply(`${insult.Insult()} <@${msg.guild.member('608481389444333583')?.id}> ${emoji.random()}`)
+ }
+ }
+ }
+}; \ No newline at end of file
diff --git a/src/commands/fun/roastwillyc.ts b/src/commands/fun/roastwillyc.ts
new file mode 100644
index 0000000..2bb4ee2
--- /dev/null
+++ b/src/commands/fun/roastwillyc.ts
@@ -0,0 +1,36 @@
+import { Command, CommandoMessage } from 'discord.js-commando';
+import insult from 'insult';
+import emoji from 'emoji-random';
+
+module.exports = class RoastWillyCustomFun extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'roastwillyc',
+ aliases: ['insultwillyc'],
+ group: 'fun',
+ memberName: 'roastwillyc',
+ description: 'Gives you a random custom insult directed towards willy.',
+ userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
+ throttling: {
+ usages: 5,
+ duration: 30
+ },
+ examples: ['uwu!insultwillyc', 'uwu!roastwillyc'],
+ args: [
+ {
+ key: 'type',
+ prompt: 'None',
+ type: 'string',
+ default: ''
+ }
+ ]
+ });
+ }
+ run(msg: CommandoMessage, { type }: any) {
+ const willysRoasts = ['you smell like weenie water', 'you are dead built like a german sausage', 'you are that one flavour of ice cream no one eats'];
+ const roastCustomBool = Math.floor(Math.random() * 3);
+ const customRoastNum = Math.floor(Math.random() * willysRoasts.length);
+ msg.reply(`${willysRoasts[customRoastNum]} <@${msg.guild.member('608481389444333583')?.id}> ${emoji.random()}`)
+ }
+}; \ No newline at end of file
diff --git a/src/commands/roleplay/blush.ts b/src/commands/roleplay/blush.ts
index 9d7352a..9a1ab5c 100644
--- a/src/commands/roleplay/blush.ts
+++ b/src/commands/roleplay/blush.ts
@@ -26,6 +26,6 @@ module.exports = class BlushRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** blushes at **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** blushes at **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/celebrate.ts b/src/commands/roleplay/celebrate.ts
index f84f6f3..1f49cd9 100644
--- a/src/commands/roleplay/celebrate.ts
+++ b/src/commands/roleplay/celebrate.ts
@@ -19,6 +19,6 @@ module.exports = class CelebrateRoleplay extends Command {
});
}
run(msg: CommandoMessage) {
- return msg.say(`_**${msg.author.username}** celebrates._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** celebrates.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/eat.ts b/src/commands/roleplay/eat.ts
index 25f4cbb..925a75c 100644
--- a/src/commands/roleplay/eat.ts
+++ b/src/commands/roleplay/eat.ts
@@ -19,6 +19,6 @@ module.exports = class EatRoleplay extends Command {
});
}
run(msg: CommandoMessage) {
- return msg.say(`_**${msg.author.username}** eats._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** eats.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/fistbump.ts b/src/commands/roleplay/fistbump.ts
index dc6d32d..3bc991a 100644
--- a/src/commands/roleplay/fistbump.ts
+++ b/src/commands/roleplay/fistbump.ts
@@ -27,6 +27,6 @@ module.exports = class FistBumpRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** fist-bumps **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** fist-bumps **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/highfive.ts b/src/commands/roleplay/highfive.ts
index 605d505..5449c50 100644
--- a/src/commands/roleplay/highfive.ts
+++ b/src/commands/roleplay/highfive.ts
@@ -27,6 +27,6 @@ module.exports = class HighFiveRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** high-fives **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** high-fives **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/holdhands.ts b/src/commands/roleplay/holdhands.ts
index 7a46667..ec63061 100644
--- a/src/commands/roleplay/holdhands.ts
+++ b/src/commands/roleplay/holdhands.ts
@@ -27,6 +27,6 @@ module.exports = class HoldHandsRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** holds **${uUser.username}** hand._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** holds **${uUser.username}** hand.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/hug.ts b/src/commands/roleplay/hug.ts
index e31e53f..d5a6f09 100644
--- a/src/commands/roleplay/hug.ts
+++ b/src/commands/roleplay/hug.ts
@@ -26,6 +26,6 @@ module.exports = class HugRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** hugs **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** hugs **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/inhale.ts b/src/commands/roleplay/inhale.ts
index 8a49bd1..3f94701 100644
--- a/src/commands/roleplay/inhale.ts
+++ b/src/commands/roleplay/inhale.ts
@@ -26,6 +26,6 @@ module.exports = class InhaleRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** inhales **${uUser.username}** but gained no abilities._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** inhales **${uUser.username}** but gained no abilities.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/kill.ts b/src/commands/roleplay/kill.ts
index 15446cd..8f1bebf 100644
--- a/src/commands/roleplay/kill.ts
+++ b/src/commands/roleplay/kill.ts
@@ -26,6 +26,6 @@ module.exports = class KillRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** kills **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** kills **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/kiss.ts b/src/commands/roleplay/kiss.ts
index 6dbec4e..d94d439 100644
--- a/src/commands/roleplay/kiss.ts
+++ b/src/commands/roleplay/kiss.ts
@@ -26,6 +26,6 @@ module.exports = class KissRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** kisses **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** kisses **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/pat.ts b/src/commands/roleplay/pat.ts
index 82c47d2..8b2d632 100644
--- a/src/commands/roleplay/pat.ts
+++ b/src/commands/roleplay/pat.ts
@@ -26,6 +26,6 @@ module.exports = class PatRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** pat **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** pats **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/poke.ts b/src/commands/roleplay/poke.ts
index a008bcb..d16818b 100644
--- a/src/commands/roleplay/poke.ts
+++ b/src/commands/roleplay/poke.ts
@@ -26,6 +26,6 @@ module.exports = class PokeRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** pokes **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** pokes **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/punch.ts b/src/commands/roleplay/punch.ts
index 8e5d8f8..2b911c6 100644
--- a/src/commands/roleplay/punch.ts
+++ b/src/commands/roleplay/punch.ts
@@ -26,6 +26,6 @@ module.exports = class PunchRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** punches **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** punches **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/slap.ts b/src/commands/roleplay/slap.ts
index afe6546..254981b 100644
--- a/src/commands/roleplay/slap.ts
+++ b/src/commands/roleplay/slap.ts
@@ -26,6 +26,6 @@ module.exports = class SlapRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** slaps **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** slaps **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/sleep.ts b/src/commands/roleplay/sleep.ts
index 5186044..bd5c399 100644
--- a/src/commands/roleplay/sleep.ts
+++ b/src/commands/roleplay/sleep.ts
@@ -19,6 +19,6 @@ module.exports = class SleepRoleplay extends Command {
});
}
run(msg: CommandoMessage) {
- return msg.say(`_**${msg.author.username}** falls asleep._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** falls asleep.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/wakeup.ts b/src/commands/roleplay/wakeup.ts
index cdf99b4..485a64d 100644
--- a/src/commands/roleplay/wakeup.ts
+++ b/src/commands/roleplay/wakeup.ts
@@ -20,6 +20,6 @@ module.exports = class WakeUpRoleplay extends Command {
});
}
run(msg: CommandoMessage) {
- return msg.say(`_**${msg.author.username}** wakes up._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** wakes up.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/wave.ts b/src/commands/roleplay/wave.ts
index 21e04f6..effc6e3 100644
--- a/src/commands/roleplay/wave.ts
+++ b/src/commands/roleplay/wave.ts
@@ -26,6 +26,6 @@ module.exports = class WaveRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** waves at **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** waves at **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/roleplay/wink.ts b/src/commands/roleplay/wink.ts
index 4b2061b..30935c1 100644
--- a/src/commands/roleplay/wink.ts
+++ b/src/commands/roleplay/wink.ts
@@ -26,6 +26,6 @@ module.exports = class WinkRoleplay extends Command {
});
}
run(msg: CommandoMessage, { uUser }: any) {
- return msg.say(`_**${msg.author.username}** winks at **${uUser.username}**._` + ' ' + emoji.random())
+ return msg.say(`___**${msg.author.username}** winks at **${uUser.username}**.___` + ' ' + emoji.random())
}
}; \ No newline at end of file
diff --git a/src/commands/voice/abee.ts b/src/commands/voice/abee.ts
index cca429f..2a838f0 100644
--- a/src/commands/voice/abee.ts
+++ b/src/commands/voice/abee.ts
@@ -1,3 +1,4 @@
+//@ts-nocheck
import ytdl from 'ytdl-core';
import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
diff --git a/src/commands/voice/itemshop.ts b/src/commands/voice/itemshop.ts
index e06403f..ad5df7b 100644
--- a/src/commands/voice/itemshop.ts
+++ b/src/commands/voice/itemshop.ts
@@ -1,4 +1,4 @@
-import ytdl from 'ytdl-core';
+/* import ytdl from 'ytdl-core';
import { Command, CommandoMessage } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
import Youtube from 'simple-youtube-api';
@@ -210,4 +210,4 @@ module.exports = class ABeeVoice extends Command {
}`;
return duration;
}
-}; \ No newline at end of file
+}; */ \ No newline at end of file
diff --git a/src/commands/voice/join.ts b/src/commands/voice/join.ts
index 07e00db..f1b761d 100644
--- a/src/commands/voice/join.ts
+++ b/src/commands/voice/join.ts
@@ -1,8 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class JoinVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'join',
group: 'voice',
@@ -17,6 +18,7 @@ module.exports = class JoinVoice extends Command {
}
});
}
+ //@ts-ignore
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()}`)
}
diff --git a/src/commands/voice/leave.ts b/src/commands/voice/leave.ts
index 9ad9984..28c6250 100644
--- a/src/commands/voice/leave.ts
+++ b/src/commands/voice/leave.ts
@@ -1,8 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class LeaveVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'leave',
aliases: ['end', 'stop'],
@@ -19,19 +20,23 @@ module.exports = class LeaveVoice extends Command {
},
});
}
+ //@ts-ignore
run(msg: CommandoMessage) {
var voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please join a channel and try again. ' + emoji.random());
- if (
- typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- msg.guild.musicData.songDispatcher == null
- ) {
+ //@ts-ignore
+ if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
+ //@ts-ignore
+ msg.guild.musicData.songDispatcher == null) {
return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
}
+ //@ts-ignore
if (!msg.guild.musicData.queue)
return msg.say('There aren\'t any songs in the current queue. ' + emoji.random());
+ //@ts-ignore
msg.guild.musicData.songDispatcher.end();
+ //@ts-ignore
msg.guild.musicData.queue.length = 0;
return;
}
diff --git a/src/commands/voice/loop.ts b/src/commands/voice/loop.ts
index eb289a4..a12c4e8 100644
--- a/src/commands/voice/loop.ts
+++ b/src/commands/voice/loop.ts
@@ -1,8 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class LoopVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'loop',
aliases: ['repeat'],
@@ -19,19 +20,20 @@ module.exports = class LoopVoice extends Command {
},
});
}
+ //@ts-ignore
run(msg: CommandoMessage) {
var voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please join a channel and try again. ' + emoji.random());
- if (
- typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- msg.guild.musicData.songDispatcher == null
- ) {
+ //@ts-ignore
+ if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
+ //@ts-ignore
+ msg.guild.musicData.songDispatcher == null) {
return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
}
- msg.say(
- `${msg.guild.musicData.nowPlaying.title} added to queue. ` + emoji.random()
- );
+ //@ts-ignore
+ msg.say(`${msg.guild.musicData.nowPlaying.title} added to queue. ` + emoji.random());
+ //@ts-ignore
msg.guild.musicData.queue.unshift(msg.guild.musicData.nowPlaying);
return;
}
diff --git a/src/commands/voice/minecraft.ts b/src/commands/voice/minecraft.ts
index 26175d3..742ddde 100644
--- a/src/commands/voice/minecraft.ts
+++ b/src/commands/voice/minecraft.ts
@@ -1,3 +1,4 @@
+//@ts-nocheck
import ytdl from 'ytdl-core';
import { Command, CommandoMessage } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
diff --git a/src/commands/voice/pause.ts b/src/commands/voice/pause.ts
index 1f23661..500a320 100644
--- a/src/commands/voice/pause.ts
+++ b/src/commands/voice/pause.ts
@@ -1,8 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class PauseVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'pause',
group: 'voice',
@@ -18,19 +19,21 @@ module.exports = class PauseVoice extends Command {
},
});
}
+ //@ts-ignore
run(msg: CommandoMessage) {
var voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please join a channel and try again. ' + emoji.random());
- if (
- typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- msg.guild.musicData.songDispatcher == null
- ) {
+ //@ts-ignore
+ if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
+ //@ts-ignore
+ msg.guild.musicData.songDispatcher == null) {
return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
}
msg.say('Song paused :pause_button:');
+ //@ts-ignore
msg.guild.musicData.songDispatcher.pause();
}
}; \ No newline at end of file
diff --git a/src/commands/voice/play.ts b/src/commands/voice/play.ts
index 398b431..97858a3 100644
--- a/src/commands/voice/play.ts
+++ b/src/commands/voice/play.ts
@@ -1,3 +1,4 @@
+//@ts-nocheck
import ytdl from 'ytdl-core';
import { Command, CommandoMessage } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
diff --git a/src/commands/voice/psycho.ts b/src/commands/voice/psycho.ts
index 8df19f8..e8f14bc 100644
--- a/src/commands/voice/psycho.ts
+++ b/src/commands/voice/psycho.ts
@@ -1,3 +1,4 @@
+//@ts-nocheck
import ytdl from 'ytdl-core';
import { Command, CommandoMessage } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
diff --git a/src/commands/voice/queue.ts b/src/commands/voice/queue.ts
index 3516a2e..f8afedd 100644
--- a/src/commands/voice/queue.ts
+++ b/src/commands/voice/queue.ts
@@ -1,9 +1,10 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
import { MessageEmbed }from 'discord.js';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class QueueVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'queue',
aliases: [
@@ -38,9 +39,12 @@ module.exports = class QueueVoice extends Command {
});
}
run(msg: CommandoMessage) {
+ //@ts-ignore
if (msg.guild.musicData.queue.length == 0)
return msg.say('There aren\'t any songs in the current queue. ' + emoji.random());
+ //@ts-ignore
const titleArray = [];
+ //@ts-ignore
msg.guild.musicData.queue.map(obj => {
titleArray.push(obj.title);
});
@@ -48,6 +52,7 @@ module.exports = class QueueVoice extends Command {
.setColor(0xFFCC4D)
.setTitle('Music Queue ' + emoji.random());
for (let i = 0; i < titleArray.length; i++) {
+ //@ts-ignore
queueEmbed.addField(`‎`, `**${i + 1}**: ` + `${titleArray[i]}`);
}
return msg.say(queueEmbed);
diff --git a/src/commands/voice/remove.ts b/src/commands/voice/remove.ts
index 41c8cbf..993a368 100644
--- a/src/commands/voice/remove.ts
+++ b/src/commands/voice/remove.ts
@@ -1,8 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class RemoveVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'remove',
group: 'voice',
@@ -25,20 +26,22 @@ module.exports = class RemoveVoice extends Command {
},
});
}
- run(msg: CommandoMessage, { songNumber }) {
+ run(msg: CommandoMessage, { songNumber }: any) {
+ //@ts-ignore
if (songNumber < 1 && songNumber >= msg.guild.musicData.queue.length) {
return msg.reply('Please enter a valid song. ' + emoji.random());
}
var voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please join a channel and try again. ' + emoji.random());
- if (
- typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- msg.guild.musicData.songDispatcher == null
- ) {
+ //@ts-ignore
+ if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
+ //@ts-ignore
+ msg.guild.musicData.songDispatcher == null) {
return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
}
+ //@ts-ignore
msg.guild.musicData.queue.splice(songNumber - 1, 1);
return msg.say(`Removed song **#${songNumber}** from current queue. ` + emoji.random());
}
diff --git a/src/commands/voice/resume.ts b/src/commands/voice/resume.ts
index ffe150b..208fba5 100644
--- a/src/commands/voice/resume.ts
+++ b/src/commands/voice/resume.ts
@@ -1,8 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class ResumeVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'resume',
group: 'voice',
@@ -22,15 +23,16 @@ module.exports = class ResumeVoice extends Command {
var voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please join a channel and try again. ') + emoji.random();
- if (
- typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- msg.guild.musicData.songDispatcher == null
- ) {
+ //@ts-ignore
+ if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
+ //@ts-ignore
+ msg.guild.musicData.songDispatcher == null) {
return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
}
msg.say('Song resumed :play_pause:');
+ //@ts-ignore
msg.guild.musicData.songDispatcher.resume();
}
}; \ No newline at end of file
diff --git a/src/commands/voice/shuffle.ts b/src/commands/voice/shuffle.ts
index bce34ac..7429f27 100644
--- a/src/commands/voice/shuffle.ts
+++ b/src/commands/voice/shuffle.ts
@@ -1,9 +1,10 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
import { MessageEmbed } from 'discord.js';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class ShuffleVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'shuffle',
group: 'voice',
@@ -23,19 +24,23 @@ module.exports = class ShuffleVoice extends Command {
var voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please join channel and try again. ' + emoji.random());
- if (
- typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- msg.guild.musicData.songDispatcher == null
- ) {
+ //@ts-ignore
+ if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
+ //@ts-ignore
+ msg.guild.musicData.songDispatcher == null) {
return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
}
+ //@ts-ignore
if (msg.guild.musicData.queue.length < 1)
return msg.say('There aren\'t any songs in the current queue. ' + emoji.random());
+ //@ts-ignore
shuffleQueue(msg.guild.musicData.queue);
+ //@ts-ignore
const titleArray = [];
+ //@ts-ignore
msg.guild.musicData.queue.map(obj => {
titleArray.push(obj.title);
});
@@ -43,13 +48,14 @@ module.exports = class ShuffleVoice extends Command {
.setColor(0xF97DAE)
.setTitle('New Music Queue ' + emoji.random());
for (let i = 0; i < titleArray.length; i++) {
+ //@ts-ignore
queueEmbed.addField(`${i + 1}:`, `${titleArray[i]}`);
}
return msg.say(queueEmbed);
}
};
-function shuffleQueue(queue) {
+function shuffleQueue(queue: any) {
for (let i = queue.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[queue[i], queue[j]] = [queue[j], queue[i]];
diff --git a/src/commands/voice/skip.ts b/src/commands/voice/skip.ts
index 1cbe630..b4cef15 100644
--- a/src/commands/voice/skip.ts
+++ b/src/commands/voice/skip.ts
@@ -1,8 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class SkipVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'skip',
group: 'voice',
@@ -18,16 +19,18 @@ module.exports = class SkipVoice extends Command {
},
});
}
+ //@ts-ignore
run(msg: CommandoMessage) {
const voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please join a channel and try again. ' + emoji.random());
- if (
- typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- msg.guild.musicData.songDispatcher == null
- ) {
+ //@ts-ignore
+ if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
+ //@ts-ignore
+ msg.guild.musicData.songDispatcher == null) {
return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
}
+ //@ts-ignore
msg.guild.musicData.songDispatcher.end();
}
}; \ No newline at end of file
diff --git a/src/commands/voice/skipall.ts b/src/commands/voice/skipall.ts
index 7d8b113..c7e0333 100644
--- a/src/commands/voice/skipall.ts
+++ b/src/commands/voice/skipall.ts
@@ -1,8 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class SkipAllVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'skipall',
aliases: [
@@ -29,19 +30,23 @@ module.exports = class SkipAllVoice extends Command {
},
});
}
+ //@ts-ignore
run(msg: CommandoMessage) {
var voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please join a channel and try again. ' + emoji.random());
- if (
- typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- msg.guild.musicData.songDispatcher == null
- ) {
+ //@ts-ignore
+ if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
+ //@ts-ignore
+ msg.guild.musicData.songDispatcher == null) {
return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
}
+ //@ts-ignore
if (!msg.guild.musicData.queue)
return msg.say('There aren\'t any songs in the current queue. ' + emoji.random());
+ //@ts-ignore
msg.guild.musicData.songDispatcher.end();
+ //@ts-ignore
msg.guild.musicData.queue.length = 0; // clear queue
return;
}
diff --git a/src/commands/voice/skipto.ts b/src/commands/voice/skipto.ts
index d11d200..ee4a7ba 100644
--- a/src/commands/voice/skipto.ts
+++ b/src/commands/voice/skipto.ts
@@ -1,8 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class SkipToVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'skipto',
group: 'voice',
@@ -23,24 +24,29 @@ module.exports = class SkipToVoice extends Command {
},
});
}
- run(msg: CommandoMessage, { songNumber }) {
+ //@ts-ignore
+ run(msg: CommandoMessage, { songNumber }: any) {
+ //@ts-ignore
if (songNumber < 1 && songNumber >= msg.guild.musicData.queue.length) {
return msg.reply('Please enter a valid song. ' + emoji.random());
}
var voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please join channel and try again. ' + emoji.random());
- if (
- typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- msg.guild.musicData.songDispatcher == null
- ) {
+ //@ts-ignore
+ if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
+ //@ts-ignore
+ msg.guild.musicData.songDispatcher == null) {
return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
}
+ //@ts-ignore
if (msg.guild.musicData.queue < 1)
return msg.reply('There aren\'t any songs in the current queue. ' + emoji.random());
+ //@ts-ignore
msg.guild.musicData.queue.splice(0, songNumber - 1);
+ //@ts-ignore
msg.guild.musicData.songDispatcher.end();
return;
}
diff --git a/src/commands/voice/volume.ts b/src/commands/voice/volume.ts
index 4851ee7..5678101 100644
--- a/src/commands/voice/volume.ts
+++ b/src/commands/voice/volume.ts
@@ -1,8 +1,9 @@
-import { Command, CommandoMessage } from 'discord.js-commando';
+import { Command, CommandoMessage, CommandoClient } from 'discord.js-commando';
+//@ts-ignore
import emoji from 'emoji-random';
module.exports = class VolumeVoice extends Command {
- constructor(client) {
+ constructor(client: CommandoClient) {
super(client, {
name: 'volume',
aliases: ['vol'],
@@ -15,7 +16,7 @@ module.exports = class VolumeVoice extends Command {
key: 'wantedVol',
prompt: 'What would volume you like? (1 to 200)',
type: 'integer',
- validate: wantedVol => wantedVol >= 1 && wantedVol <= 200
+ validate: (wantedVol: number) => wantedVol >= 1 && wantedVol <= 200
}
],
examples: [
@@ -30,20 +31,22 @@ module.exports = class VolumeVoice extends Command {
},
});
}
- run(msg: CommandoMessage, { wantedVol }) {
+ run(msg: CommandoMessage, { wantedVol }: any) {
var voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please join a channel and try again. ' + emoji.random());
- if (
- typeof msg.guild.musicData.songDispatcher == 'undefined' ||
- msg.guild.musicData.songDispatcher == null
- ) {
+ //@ts-ignore
+ if (typeof msg.guild.musicData.songDispatcher == 'undefined' ||
+ //@ts-ignore
+ msg.guild.musicData.songDispatcher == null) {
return msg.reply('There isn\'t any audio playing right now. ' + emoji.random());
}
const volume = wantedVol / 100;
+ //@ts-ignore
msg.guild.musicData.volume = volume;
+ //@ts-ignore
msg.guild.musicData.songDispatcher.setVolume(volume);
- msg.reply(`Volume is now: **${wantedVol}%**. ` + emoji.random());
+ return msg.reply(`Volume is now: **${wantedVol}%**. ` + emoji.random());
}
}; \ No newline at end of file