feat(bot): add dockerfile for JS rewrite, fix some loose ends

This commit is contained in:
41666 2021-03-24 05:05:40 -04:00
parent 7ec603cf70
commit 9fc515a014
4 changed files with 23 additions and 32 deletions

View file

@ -22,6 +22,11 @@ function messageEventListener(message) {
channel.send(`:beginner: Assign your roles here! ${appUrl}/s/${guildId}`);
}
const client = new Client();
const client = new Client({
ws: {
intents: ['GUILDS', 'GUILD_MESSAGES'],
},
});
client.on('message', (message) => messageEventListener(message));
client.login(botToken);

View file

@ -5,5 +5,8 @@ const { ShardingManager } = require('discord.js');
const botToken = process.env['BOT_TOKEN'];
const manager = new ShardingManager('./bot.js', { token: botToken });
const manager = new ShardingManager(path.resolve(__dirname, 'bot.js'), {
token: botToken,
});
manager.spawn();

View file

@ -5,6 +5,7 @@
"start": "node index.js"
},
"dependencies": {
"discord.js": "^12.5.1"
"discord.js": "^12.5.3",
"dotenv": "^8.2.0"
}
}