Added Interaction integration

This commit is contained in:
ION606
2023-03-20 12:45:20 -04:00
parent 9faf4a315e
commit 0e33185f16
10 changed files with 286 additions and 8 deletions
+37
View File
@@ -0,0 +1,37 @@
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!");
});