2023-04-01 21:49:27 -04:00
|
|
|
import { Client, gateWayIntents, message, Interaction } from '../structures/types.js';
|
|
|
|
|
import config from '../config.json' assert { type: 'json' };
|
|
|
|
|
const { bottoken } = config;
|
2023-03-20 12:45:20 -04:00
|
|
|
|
|
|
|
|
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) => {
|
2023-04-01 21:49:27 -04:00
|
|
|
(await import('./messageTests.js')).default(message);
|
2023-03-20 12:45:20 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
c.on('interactionRecieved', /** @param {Interaction} interaction*/ async (interaction) => {
|
2023-04-01 21:49:27 -04:00
|
|
|
(await import('./interactionTests.js')).default(interaction);
|
2023-03-20 12:45:20 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
2023-03-24 20:32:27 -04:00
|
|
|
c.on('guildCreate', async (guild) => {
|
2023-04-01 21:49:27 -04:00
|
|
|
(await import('./guildTests.js')).default(c);
|
2023-03-24 20:32:27 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
2023-03-20 12:45:20 -04:00
|
|
|
c.on('ready', () => {
|
|
|
|
|
console.log("BOT ONLINE!");
|
|
|
|
|
});
|