mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
refactor: rename events to be consistent with WS names (#6010)
Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
@@ -9,7 +9,6 @@ const log = (...args) => console.log(process.uptime().toFixed(3), ...args);
|
||||
const client = new Client({
|
||||
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES],
|
||||
shardCount: 2,
|
||||
intents: Discord.Intents.NON_PRIVILEGED,
|
||||
});
|
||||
|
||||
client.on('debug', log);
|
||||
@@ -36,7 +35,7 @@ const commands = {
|
||||
ping: message => message.channel.send('pong'),
|
||||
};
|
||||
|
||||
client.on('message', message => {
|
||||
client.on('messageCreate', message => {
|
||||
if (!message.content.startsWith(prefix) || message.author.bot) return;
|
||||
|
||||
message.content = message.content.replace(prefix, '').trim().split(' ');
|
||||
|
||||
Reference in New Issue
Block a user