mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-15 17:19:10 +00:00
feat(bot): add dockerfile for JS rewrite, fix some loose ends (#210)
This commit is contained in:
parent
7ec603cf70
commit
3190d41a9e
4 changed files with 23 additions and 32 deletions
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"start": "node index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"discord.js": "^12.5.1"
|
||||
"discord.js": "^12.5.3",
|
||||
"dotenv": "^8.2.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue