mirror of
https://github.com/arthur-pbty/bot-discord-coins.git
synced 2026-06-03 23:36:29 +02:00
Revert "Update event (deso grose pagaille)"
This reverts commit 16d357208f.
This commit is contained in:
@@ -1,42 +1,15 @@
|
||||
const { Client, IntentsBitField, Collection } = require("discord.js");
|
||||
const client = new Client({
|
||||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildBans, GatewayIntentBits.GuildEmojisAndStickers, GatewayIntentBits.GuildIntegrations, GatewayIntentBits.GuildWebhooks, GatewayIntentBits.GuildInvites, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.DirectMessages, GatewayIntentBits.DirectMessageReactions, GatewayIntentBits.DirectMessageTyping, GatewayIntentBits.GuildScheduledEvents, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
|
||||
partials: [Partials.Channel, Partials.GuildMember, Partials.GuildScheduledEvent, Partials.Message, Partials.Reaction, Partials.ThreadMember, Partials.User],
|
||||
restTimeOffset: 0,
|
||||
failIfNotExists: false,
|
||||
presence: {
|
||||
activities: [{
|
||||
name: `starting...`,
|
||||
type: ActivityType.Custom,
|
||||
}],
|
||||
},
|
||||
allowedMentions: {
|
||||
parse: ["roles", "users", "everyone"],
|
||||
repliedUser: false
|
||||
}
|
||||
});
|
||||
|
||||
require('dotenv').config();
|
||||
const color = require('colors')
|
||||
const fs = require('fs')
|
||||
|
||||
const { Client, IntentsBitField, Collection } = require("discord.js");
|
||||
const loadCommands = require("./fonctions/loadCommands");
|
||||
const loadEvents = require("./fonctions/loadEvents");
|
||||
const client = new Client({intents: new IntentsBitField(3276799)});
|
||||
const color = require('colors')
|
||||
|
||||
client.events = new Collection();
|
||||
client.commands = new Collection();
|
||||
client.config = require("./config.json");
|
||||
|
||||
console.log(`${loadEvents(client, '..\\events')} events loaded`.grey);
|
||||
const eventFiles = fs.readdirSync("./events").filter(file => file.endsWith(".js"));
|
||||
for (const file of eventFiles) {
|
||||
const event = require(`./events/${file}`);
|
||||
if (event.once) {
|
||||
client.once(event.name, (...args) => event.execute(client, ...args));
|
||||
} else {
|
||||
client.on(event.name, (...args) => event.execute(client, ...args));
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`${loadCommands(client, '..\\commands')} commands loaded`.grey);
|
||||
|
||||
client.login(process.env.TOKEN);
|
||||
Reference in New Issue
Block a user