mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-14 21:26:54 +00:00
Fixed the 'setup announcement_role' command and added the 'twitchnotifs.js' file
This commit is contained in:
@@ -27,6 +27,7 @@ async function execute(bot, message, args, command, Discord, mongouri, items, xp
|
||||
|
||||
bot.mongoconnection.then(async (client) => {
|
||||
// if (err) { return console.log(err); }
|
||||
try {
|
||||
//Initialize
|
||||
CreateNewCollection(message, client, server, owner.user.id);
|
||||
|
||||
@@ -79,6 +80,9 @@ async function execute(bot, message, args, command, Discord, mongouri, items, xp
|
||||
|
||||
dbo.updateOne({_id: 'LOG'}, {$set: {severity: tier}})
|
||||
} else if (command == 'announcement_role') {
|
||||
if (message.mentions.roles.first() == undefined) {
|
||||
return message.reply("Please mention a role (_!setup announcement\\_role **@role**_)\n_Note: Selmer Bot does NOT ping the @everyone role_");
|
||||
}
|
||||
const role = message.mentions.roles.first().id;
|
||||
dbo.updateOne({_id: 'announcement'}, { $set: { 'role': role } });
|
||||
} else if (command == "announcement_channel") {
|
||||
@@ -101,6 +105,9 @@ async function execute(bot, message, args, command, Discord, mongouri, items, xp
|
||||
|
||||
message.reply(temp);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/* TODO
|
||||
1) Save by streamer id, with the users to ping inside
|
||||
2) Check the streamers every 5 min or so
|
||||
*/
|
||||
Reference in New Issue
Block a user