refactor: rename events to be consistent with WS names (#6010)

Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
Antonio Román
2021-07-03 14:23:53 +02:00
committed by GitHub
parent 7dd1a8da08
commit a11a10525b
13 changed files with 50 additions and 83 deletions

View File

@@ -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 => {