Javascript discord bot mention user midsentence Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Javascript discord bot mention user midsentence without wasting too much if your time.

The question is published on by Tutorial Guruji team.

Trying to get the bot to spit out random scenario messages that also include @user midsentence.

var myArray = [ + " challenges the producers, but fails to survive a single puppet",
  "Oh no, " + + " got demolished by **Mr. Smiles**",
  "After gearing up in several events " + + " tried to swim and drowned"
var rand = myArray[Math.floor(Math.random() * myArray.length)];

The command is linking to this script and so far works, although instead of mentioning the user doing the command, it prints “undefined”.

I’m fairly new to javascript, but let me know if you need more information

Answer is an object. If you want to get his name do If you want to mention him do: "<@" + + ">"

We are here to answer your question about Javascript discord bot mention user midsentence - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji