Closed Wingysam closed 7 years ago
Are you running the script under a created bot
account, or your (or any) user
account?
I'm running it under a bot
account, created by me.
I've had the same issue for the longest time.
@Wingysam The dIO.users
object can sometimes be unstable if your bot does not have a good internet connection, could you please give reproducible steps to recreate the issue you are experiencing.
Also, are you using a selfbot/userbot?
Edit: Apparently I cant read, try doing dIO.servers[guildid]['members'][userID].bot
as using dIO.servers
is alot more stable than dIO.users
client.users
should be stable enough, I'm not sure if I set the bot
property of a user who isn't a bot, I'll have to check and edit that later, however if that's the case, just change your code to something like if (bot.users[userID].bot) { /*The user is a bot*/ }
.
I have
bot.users[userID].bot
in mybot.on('message')
, and it's sometimes undefined. Not always. I hope this is enough to reproduce.