Updated server intents
This commit is contained in:
@@ -26,7 +26,7 @@ const {
|
||||
} = require('discord.js');
|
||||
|
||||
const client = new Client({
|
||||
intents: [GatewayIntentBits.GuildMessages, GatewayIntentBits.Guilds]
|
||||
intents: [GatewayIntentBits.GuildMessages, GatewayIntentBits.Guilds, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMembers]
|
||||
});
|
||||
|
||||
prefix = process.env.PREFIX
|
||||
@@ -117,11 +117,22 @@ const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('
|
||||
//const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
|
||||
for (const file of commandFiles) {
|
||||
const filePath = path.join(commandsPath, file);
|
||||
const command = require(filePath);
|
||||
log.DEBUG("Importing command: ", command.data.name);
|
||||
// Set a new item in the Collection
|
||||
// With the key as the command name and the value as the exported module
|
||||
client.commands.set(command.data.name, command);
|
||||
const command = require(filePath);
|
||||
if (command.data instanceof Promise) {
|
||||
command.data.then(async (builder) => {
|
||||
command.data = builder;
|
||||
log.DEBUG("Importing command: ", command.data.name, command);
|
||||
// Set a new item in the Collection
|
||||
// With the key as the command name and the value as the exported module
|
||||
client.commands.set(command.data.name, command);
|
||||
});
|
||||
}
|
||||
else {
|
||||
log.DEBUG("Importing command: ", command.data.name, command);
|
||||
// Set a new item in the Collection
|
||||
// With the key as the command name and the value as the exported module
|
||||
client.commands.set(command.data.name, command);
|
||||
}
|
||||
}
|
||||
|
||||
// Run when the bot is ready
|
||||
@@ -137,7 +148,7 @@ client.on('ready', () => {
|
||||
runHTTPServer();
|
||||
|
||||
log.DEBUG("Starting Node Monitoring Service");
|
||||
runNodeMonitorService();
|
||||
//runNodeMonitorService();
|
||||
|
||||
log.DEBUG("Starting RSS watcher");
|
||||
runRssService();
|
||||
|
||||
Reference in New Issue
Block a user