yourWaifu / sleepy-discord

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

Why is there an error? #262

Closed logican710 closed 2 years ago

logican710 commented 2 years ago

void onEditMessage(SleepyDiscord::MessageRevisions remessage)override { std::string a = remessage.RevisionsJSON.GetString(); sendMessage(remessage.channelID, a);

}

bug message

thanks

yourWaifu commented 2 years ago

it should be

remessage.applyChanges(outOfDateMessage);

RevisionsJSON is not a json string, so it'll abort since the types don't match up. I believe what you want is the internal function SleepyDiscord::json::stringify

logican710 commented 2 years ago

Thank you for your kind answer.