Discord bot (Ruby) how do i mention the author?

after the bot executes it returns with an event.respond "example message"

what i'm trying to do is get that event.respond to go directly to the user/author. so the user sees the message like this "@bot_user example message".

i've tried things like event.author.respond, event.user.respond and a number of other things but I can't seem to find any ruby examples out there. Thanks in advance for any help

Posted Mar 24, 2018, 6:03 PM UTC

03
ChewsterchewChewLeKitten#6216•

If you're trying to mention the user, the code is "event.user.mention" Example

If you're not already on it, feel free to join the discordrb channel on the Discord API server, instead of posting here to reddit.

Enjoy.

2
TrunkheadOP•

yes! thank you a ton man

2

I'm not a Ruby developer, but it would probably help any reading to mention what library you're using to interface with the API.

If I take a wild guess and assume you're using this one - there are some examples here that may lead you to the right syntax.

1