mirror of
https://github.com/ION606/custom_discordjs.git
synced 2026-05-14 22:26:54 +00:00
37 lines
985 B
JavaScript
37 lines
985 B
JavaScript
const { Client, gateWayIntents, message, Interaction } = require('../structures/types');
|
|
const { bottoken } = require('../config.json');
|
|
|
|
|
|
var c = new Client({
|
|
intents: [
|
|
gateWayIntents.Guilds,
|
|
gateWayIntents.GuildMessages,
|
|
gateWayIntents.GuildMessageReactions,
|
|
gateWayIntents.GuildVoiceStates,
|
|
gateWayIntents.GuildEmojisAndStickers,
|
|
gateWayIntents.GuildPresences,
|
|
gateWayIntents.GuildMembers,
|
|
gateWayIntents.DirectMessages,
|
|
gateWayIntents.DirectMessageReactions,
|
|
gateWayIntents.DirectMessageTyping,
|
|
gateWayIntents.MessageContent
|
|
]
|
|
});
|
|
|
|
|
|
c.login(bottoken);
|
|
|
|
|
|
c.on('messageRecieved', /**@param {message} message*/ async (message) => {
|
|
require('./messageTests.js')(message);
|
|
});
|
|
|
|
|
|
c.on('interactionRecieved', /** @param {Interaction} interaction*/ async (interaction) => {
|
|
require('./interactionTests.js')(interaction);
|
|
});
|
|
|
|
|
|
c.on('ready', () => {
|
|
console.log("BOT ONLINE!");
|
|
}); |