Category : discord.js

For a specific channel in my server, I want to make it so that a user can’t send two messages in a row. Here’s the code I got so far: client.on(‘message’, message => { if(message.guild.id != ‘123478291364192834’) return; if(message.channel.id != ‘432874912364123984’) return; let messageauthor = ” message.channel.messages.fetch({limit:2}).then(messages=>{ messages .forEach(message=>{ messageauthor = message.author.id }) }) if(messageauthor ..

Read more

my Bot is playing the same audio File for joining and leaving the Voice Channel and i dont know how to solve it: client.on(‘voiceStateUpdate’, (oldMember, newMember) => { let newUserChannel = newMember.voiceChannel let oldUserChannel = oldMember.voiceChannel const voiceChannel = client.channels.cache.get(‘807305239941480543’) const Bot = "808042353477550090" if(oldUserChannel === undefined && newUserChannel !== undefined && oldMember.member.user.bot === false ..

Read more