Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
bc: (msg, [globalMessage]) => {
if (!sentByBotAdmin(msg)) {
msg.reply("you don't get to yell at everyone!");
} else {
sql.each('SELECT * FROM guilds', (err, row) => {
if (row.broadcastChannel && !err) {
if (row.broadcastChannel !== '-1') {
bot.channels.get(row.broadcastChannel).send(globalMessage);
}
} else if (bot.guilds.has(row.id)) {
defaultChannel(bot.guilds.get(row.id)).then(channel => {
channel.send(globalMessage);
});
}
}).catch(console.error);
}
},
swiki: (msg, [wiki]) => {