use user guild avatar and name

This commit is contained in:
Syping 2024-01-17 13:13:51 +01:00
parent 502cabd7a7
commit 2b24b90c54

View file

@ -56,8 +56,10 @@ int main(int argc, char* argv[]) {
if (channel) { if (channel) {
bot::message message; bot::message message;
message.id = event.msg.id; message.id = event.msg.id;
message.author = event.msg.author.format_username(); message.author = event.msg.member.get_nickname();
message.avatar = event.msg.author.get_avatar_url(settings.get_avatar_size()); message.avatar = event.msg.member.get_avatar_url(settings.get_avatar_size());
if (message.avatar.empty())
message.avatar = event.msg.author.get_avatar_url(settings.get_avatar_size());
message.message = event.msg.content; message.message = event.msg.content;
message.source = channel->source; message.source = channel->source;
message.targets = channel->targets; message.targets = channel->targets;