mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
I think I got ChannelUpdate working??
This commit is contained in:
@@ -79,9 +79,17 @@ client.on('message', message => {
|
||||
if (message.content === 'delchann') {
|
||||
message.channel.delete();
|
||||
}
|
||||
|
||||
if (message.content.startsWith('setname')) {
|
||||
message.channel.setName(message.content.substr(8)).then(chanLoop).catch(console.log);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function chanLoop(channel) {
|
||||
channel.setName(channel.name + 'a').then(chanLoop).catch(console.log);
|
||||
}
|
||||
|
||||
client.on('messageDelete', message => {
|
||||
console.log('Message deleted by', message.author.username);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user