summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-08 02:03:40 -0700
committer8cy <[email protected]>2020-04-08 02:03:40 -0700
commit06604e6d432c2a82e151f7d2b1776d8546bd2389 (patch)
treefc736bb459f301aa23fe7a193586214860b1226b /app.js
parentadd custom to botstatus types, v1.4.2 (diff)
downloads5nical-06604e6d432c2a82e151f7d2b1776d8546bd2389.tar.xz
s5nical-06604e6d432c2a82e151f7d2b1776d8546bd2389.zip
fix uptime, v1.4.3
Diffstat (limited to 'app.js')
-rw-r--r--app.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/app.js b/app.js
index 7de3df3..aa90a17 100644
--- a/app.js
+++ b/app.js
@@ -114,6 +114,14 @@ bot.on('message', async msg => {
if (msg.member.hasPermission(p)) return true;
}
+ function connectionCheck() {
+ if (msg.guild.voiceConnection) {
+ msg.reply('i\'m already playing that lol');
+ } else {
+ msg.reply('you need to join a voice channel first silly');
+ }
+ }
+
// Cooldown check
// TODO: implament cooldowns when needed https://discordjs.guide/command-handling/adding-features.html#cooldowns
@@ -121,11 +129,8 @@ bot.on('message', async msg => {
try {
const cmd = bot.commands.get(command) || bot.commands.find(c => c.aliases && c.aliases.includes(command));
- if (!cmd) {
- msg.reply('thats not a command silly');
- } else if (cmd) {
- cmd.execute(msg, args, bot);
- }
+ if (!cmd) return;
+ cmd.execute(msg, args, bot, duration);
return;
} catch (error) {
console.error(error);
@@ -133,11 +138,6 @@ bot.on('message', async msg => {
return;
}
- // Small command which need app.js variables
- if (command == 'uptime' | command == 'ut') {
- msg.reply(duration);
- }
-
// Reacts with ping emoji when @everyone
if (msg.mentions.everyone) {
msg.react(':ArisaPing:695887537390223402');