Start work on raid checkpoint channel cleaner

This commit is contained in:
Ean Milligan (Bastion) 2022-09-08 00:46:53 -04:00
parent 25cd42d7b1
commit 92661ea575
2 changed files with 17 additions and 12 deletions

View File

@ -1,6 +1,6 @@
export const config = {
'name': 'Sweeper Bot', // Name of the bot
'version': '0.2.3', // Version of the bot
'version': '0.2.4', // Version of the bot
'token': 'the_bot_token', // Discord API Token for this bot
'localtoken': 'local_testing_token', // Discord API Token for a secondary OPTIONAL testing bot, THIS MUST BE DIFFERENT FROM "token"
'prefix': 's!', // Prefix for all commands
@ -17,6 +17,7 @@ export const config = {
'devServer': 0n, // Discord guild ID where testing of indev features/commands will be handled, used in conjuction with the DEVMODE bool in mod.ts
'ownerId': 0n, // Discord user ID of the bot owner
'pollChannels': [], // List of Discord channel IDs that are to be managed by the pollReaction system
'raidCheckpointChannel': [], // List of Discord channel IDs that are to be managed by the cleanRaidCheckpoints system
};
export default config;

View File

@ -28,6 +28,10 @@ export const messageCreate = async (bot: Bot, message: Message) => {
functions.pollReactions(bot, message);
}
if (config.raidCheckpointChannel.includes(message.channelId)) {
console.log(message);
}
// return as we are done handling this command
return;
}
@ -77,17 +81,17 @@ export const messageCreate = async (bot: Bot, message: Message) => {
commands.sendMessage(bot, message, args);
}
break;
case 'test':
const test = await bot.helpers.getMessage(413640605491658754n, 1016090989816987701n);
console.log(test)
if (test.reactions && test.reactions.length) {
console.log(test.reactions[0])
const what = `${test.reactions[0].emoji.name}${test.reactions[0].emoji.id ? `:${test.reactions[0].emoji.id}` : ''}`;
console.log(what)
await getReactions(bot, 413640605491658754n, 1016090989816987701n, what)
}
// bot.helpers
break;
// case 'test':
// const test = await bot.helpers.getMessage(413640605491658754n, 1016090989816987701n);
// console.log(test)
// if (test.reactions && test.reactions.length) {
// console.log(test.reactions[0])
// const what = `${test.reactions[0].emoji.name}${test.reactions[0].emoji.id ? `:${test.reactions[0].emoji.id}` : ''}`;
// console.log(what)
// await getReactions(bot, 413640605491658754n, 1016090989816987701n, what)
// }
// // bot.helpers
// break;
default:
// Non-standard commands
console.log(`${command} WIP`);