Discord.js: msg.author.bot is undefined

Created on 11 Sep 2016  路  6Comments  路  Source: discordjs/discord.js

if(input === "AVATAR"){ msg.reply('here is your URL to the avatar'); msg.reply(msg.author.bot) } whenever I try this msg.author.bot tells me in discord it is undefined, so there are no errors with the code, I juts obviously typed something wrong.

bug

Most helpful comment

Only occurs when bot is not true. If it's true, it'll show true.

All 6 comments

putting message.author.bot in that kind context would always return undefined

soooo.... what context do I need? as on the website of the docs it just says .bot

lets say you don't want the bot to reply to itself. It would be if (message.author.bot) return;

But how would I print it to the chat?

Only occurs when bot is not true. If it's true, it'll show true.

should be fixed in f0a9a1353fad6e46add1664f9f7c73e69ac868d8 where it is forced to be false

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Dmitry221060 picture Dmitry221060  路  3Comments

BrandonCookeDev picture BrandonCookeDev  路  3Comments

Acaretia picture Acaretia  路  3Comments

ghost picture ghost  路  3Comments

Lombra picture Lombra  路  3Comments