yourWaifu / sleepy-discord

C++ library for the Discord chat client. Please use Rust for new bots
https://yourWaifu.github.io/sleepy-discord/
MIT License
705 stars 96 forks source link

[ASK] HOW TO REPLY A MESSAGE? #251

Closed codeszsoft closed 2 years ago

codeszsoft commented 2 years ago

How to reply a message?

yourWaifu commented 2 years ago

There's more than a few ways to do an inline reply. First way is by using slash commands. 2nd way is by using the SleepyDiscord::SendMessageParams class

SleepyDiscord::SendMessageParams params;
params.content = "Hello there";
params.channelID = message.channelID;
// Set inline reply data
params.messageReference.messageID = message.ID;
params.messageReference.channelID = message.channelID;
params.messageReference.serverID = message.serverID;
params.allowedMentions = {{}}; // Do not mention anyone
// Send the message
client.sendMessage(params);