Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* APP.JS */
- const {
- Client,
- Collection,
- GatewayIntentBits,
- GuildMember,
- MessageFlags,
- } = require('discord.js');
- const twitch = require('./middleware/streams.js');
- const client = new Client({
- intents: [
- GatewayIntentBits.DirectMessages,
- GatewayIntentBits.Guilds,
- GatewayIntentBits.GuildMembers,
- GatewayIntentBits.GuildMessages,
- GatewayIntentBits.GuildVoiceStates,
- GatewayIntentBits.MessageContent,
- ],
- partials: [ 'CHANNEL' ]
- });
- for (const file of eventFiles) {
- // define path:
- const filePath = path.join(eventsPath, file);
- const event = require(filePath);
- (event.once) ? client.once(event.name, (...args) => event.execute(...args)) : client.on(event.name, (...args) => event.execute(...args));
- };
- client.login(process.env.DISCORD_TOKEN);
- twitch();
- module.exports = client;
Advertisement