mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13: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:
@@ -42,7 +42,7 @@ client.on('debug', console.log);
|
||||
client.on('error', m => console.log('debug', new Error(m).stack));
|
||||
client.on('reconnecting', m => console.log('reconnecting', m));
|
||||
|
||||
client.on('message', message => {
|
||||
client.on('messageCreate', message => {
|
||||
if (true) {
|
||||
if (message.content === 'makechann') {
|
||||
if (message.channel.guild) {
|
||||
@@ -178,7 +178,7 @@ function chanLoop(channel) {
|
||||
.catch(console.error);
|
||||
}
|
||||
|
||||
client.on('message', msg => {
|
||||
client.on('messageCreate', msg => {
|
||||
if (msg.content.startsWith('?raw')) {
|
||||
msg.channel.send(`\`\`\`${msg.content}\`\`\``);
|
||||
}
|
||||
@@ -200,7 +200,7 @@ client.on('message', msg => {
|
||||
|
||||
let disp, con;
|
||||
|
||||
client.on('message', msg => {
|
||||
client.on('messageCreate', msg => {
|
||||
if (msg.content.startsWith('/play')) {
|
||||
console.log('I am now going to play', msg.content);
|
||||
const chan = msg.content
|
||||
@@ -243,7 +243,7 @@ client.on('messageReactionRemove', (reaction, user) => {
|
||||
reaction.message.channel.send(`${user.username} removed reaction ${reaction.emoji}, count is now ${reaction.count}`);
|
||||
});
|
||||
|
||||
client.on('message', m => {
|
||||
client.on('messageCreate', m => {
|
||||
if (m.content.startsWith('#reactions')) {
|
||||
const mID = m.content.split(' ')[1];
|
||||
m.channel.messages.fetch(mID).then(rM => {
|
||||
|
||||
Reference in New Issue
Block a user