diff --git a/commands/fill.js b/commands/fill.js index 76a71fc..530cc1f 100644 --- a/commands/fill.js +++ b/commands/fill.js @@ -5,7 +5,7 @@ const command = { mod: true, run: async (client, msg, splitted) => { if (!splitted[2]) { - client + await client .say(msg.channelName, `${msg.displayName}, Supply an arg PoroSad`) .catch((err) => console.log(err)); diff --git a/commands/fm.js b/commands/fm.js index 9ea1952..d7df0ac 100644 --- a/commands/fm.js +++ b/commands/fm.js @@ -5,7 +5,7 @@ const command = { mod: false, run: async (client, msg, splitted) => { if (splitted[2] === undefined) { - client.say( + await client.say( msg.channelName, `${msg.displayName}, supply your Last.FM username PoroSad` ); @@ -22,7 +22,7 @@ const command = { .catch((err) => console.log(err)); if (data === undefined) { - client + await client .say(msg.channelName, `${msg.displayName}, Invalid user PoroSad`) .catch((err) => console.log(err)); return; diff --git a/commands/hn.js b/commands/hn.js index bae3e9a..eeb7d09 100644 --- a/commands/hn.js +++ b/commands/hn.js @@ -11,7 +11,7 @@ const command = { .then((data) => data.hits[Math.floor(Math.random() * data.hits.length)]) .catch((err) => console.log(err)); - client + await client .say( msg.channelName, `${msg.displayName}, Hacker News: ${data.title} (Points: ${data.points}, Comments: ${data.num_comments}) Article: ${data.url} Comments: https://news.ycombinator.com/item?id=${data.objectID}` diff --git a/commands/join.js b/commands/join.js index 238d029..16fef25 100644 --- a/commands/join.js +++ b/commands/join.js @@ -6,18 +6,20 @@ const command = { run: async (client, msg) => { await client .join(msg.senderUsername) - .then(() => - client.say( - msg.channelName, - `${msg.displayName}, joined ${msg.senderUsername} BroBalt` - ) + .then( + async () => + await client.say( + msg.channelName, + `${msg.displayName}, joined ${msg.senderUsername} BroBalt` + ) ) .then(() => client.say(msg.senderUsername, "MrDestructoid")) - .catch(() => - client.say( - msg.channelName, - `${msg.displayName}, the bot is probably in your chat, but can't speak because of phone number etc verification` - ) + .catch( + async () => + await client.say( + msg.channelName, + `${msg.displayName}, the bot is probably in your chat, but can't speak because of phone number etc verification` + ) ); }, }; diff --git a/commands/love.js b/commands/love.js index 479532d..81a6d82 100644 --- a/commands/love.js +++ b/commands/love.js @@ -5,7 +5,10 @@ const command = { mod: false, run: async (client, msg, splitted) => { if (splitted[2] === undefined || splitted[3] === undefined) { - client.say(msg.channelName, `${msg.displayName}, supply 2 args PoroSad`); + await client.say( + msg.channelName, + `${msg.displayName}, supply 2 args PoroSad` + ); return; } diff --git a/commands/mail.js b/commands/mail.js index 90395dc..6d36ca8 100644 --- a/commands/mail.js +++ b/commands/mail.js @@ -61,7 +61,7 @@ const command = { } default: { - client + await client .say( msg.channelName, `${msg.displayName}, supply an action (create or fetch)` diff --git a/commands/rl.js b/commands/rl.js index da73436..59d347d 100644 --- a/commands/rl.js +++ b/commands/rl.js @@ -14,7 +14,7 @@ const command = { .catch((err) => console.log(err)); if (!data) { - client + await client .say( msg.channelName, `${msg.displayName}, nothing found or ivr api is down` @@ -24,7 +24,7 @@ const command = { return; } - client + await client .say( msg.channelName, `${msg.displayName}, [${new Date(data.timestamp).toLocaleString()}] ${ diff --git a/commands/short.js b/commands/short.js index efc5096..b18c15e 100644 --- a/commands/short.js +++ b/commands/short.js @@ -26,7 +26,7 @@ const command = { .then((res) => res.text()) .catch((err) => console.log(err)); - client + await client .say(msg.channelName, `${msg.displayName}, shortened URL: ${data}`) .catch((err) => console.log(err)); }, diff --git a/commands/sketch.js b/commands/sketch.js index 6fee48f..7776751 100644 --- a/commands/sketch.js +++ b/commands/sketch.js @@ -5,7 +5,7 @@ const command = { mod: false, run: async (client, msg, splitted) => { if (!splitted[2]) { - client.say( + await client.say( msg.channelName, `${msg.displayName}, please supply an URL PoroSad` ); @@ -30,7 +30,7 @@ const command = { .then((res) => res.text()) .catch((err) => console.log(err)); - client + await client .say(msg.channelName, `${msg.displayName}, sketchified URL: ${data}`) .catch((err) => console.log(err)); }, diff --git a/commands/twitter.js b/commands/twitter.js index 554bc40..100b58a 100644 --- a/commands/twitter.js +++ b/commands/twitter.js @@ -20,7 +20,7 @@ const command = { .catch((err) => console.log(err)); if (!data) { - client + await client .say( msg.channelName, `${msg.displayName}, invalid name or api's are down` diff --git a/commands/weather.js b/commands/weather.js index dc57af2..48383c2 100644 --- a/commands/weather.js +++ b/commands/weather.js @@ -22,7 +22,7 @@ const command = { .catch((err) => console.log(err)); if (data === undefined) { - client + await client .say(msg.channelName, `${msg.displayName}, Invalid location PoroSad`) .catch((err) => console.log(err)); diff --git a/commands/yts.js b/commands/yts.js index eb5c4eb..a6f775b 100644 --- a/commands/yts.js +++ b/commands/yts.js @@ -5,7 +5,7 @@ const command = { mod: false, run: async (client, msg, splitted) => { if (splitted[2] === undefined) { - client + await client .say(msg.channelName, `${msg.displayName}, supply a search PoroSad`) .catch((err) => console.log(err)); return;