Skip to content Skip to sidebar Skip to footer

How To Make My Bot Mention The Person Who Gave That Bot Command

I am making a discord bot, and I want to do this: someone type -ping and the bot responds with @theuserwhotyped-ping. I have no errors, I just don't know how to code it, and I don'

Solution 1:

You can either use message.reply:

message.reply('typed ping');

It sends a reply, like @peter, typed ping.

Or use the message.author:

message.channel.send(`${message.author} typed ping`);

It sends a message like @peter typed ping.

Post a Comment for "How To Make My Bot Mention The Person Who Gave That Bot Command"