question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

msg.author.bot is undefined

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
bwpikaardcommented, Sep 11, 2016

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

0reactions
amishshahcommented, Sep 11, 2016

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discord Bot replying to itself, doesn't recognize message ...
The error is telling you that message.author is undefined , therefore bot is not a valid property. You are attempting to use a...
Read more >
Updating from v12 to v13 - discord.js Guide
Message #reply will no longer result in the bot prepending a user mention to the content, replacing the behavior with Discord's reply feature....
Read more >
[Solved]-error message in discord bot? (discord.js)
You have to many parameters to your function, so message is undefined. Should look like this: client.on("message", (msg)=>{ const Prefix = ',' ...
Read more >
How to use Message function in js - Tabnine
client.on("message", async message => { const prefix = "_"; if (message.author.bot) return; if (!message.guild) return; if (!message.content.
Read more >
cannot read properties of undefined (reading 'send') - You.com
bot.on('message', message => { let e = message.content.split(" ... if (message.channel.type == "dm"){ message.author.send("use !send"); ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found