34 lines
786 B
JavaScript
34 lines
786 B
JavaScript
const Eris = require("eris");
|
|
const config = require("./cfg");
|
|
|
|
const intents = [
|
|
// PRIVILEGED INTENTS
|
|
"guildMembers", // For server greetings
|
|
|
|
// REGULAR INTENTS
|
|
"directMessages", // For core functionality
|
|
"guildMessages", // For bot commands and mentions
|
|
"guilds", // For core functionality
|
|
"guildVoiceStates", // For member information in the thread header
|
|
"guildMessageTyping", // For typing indicators
|
|
"directMessageTyping", // For typing indicators
|
|
|
|
// EXTRA INTENTS (from the config)
|
|
...config.extraIntents,
|
|
];
|
|
|
|
const bot = new Eris.Client(config.token, {
|
|
restMode: true,
|
|
intents: Array.from(new Set(intents)),
|
|
allowedMentions: {
|
|
everyone: false,
|
|
roles: false,
|
|
users: false,
|
|
},
|
|
});
|
|
|
|
/**
|
|
* @type {Eris.Client}
|
|
*/
|
|
module.exports = bot;
|