store user from interaction even if member is not present

This commit is contained in:
ouwou 2022-09-09 02:51:59 -04:00
parent f3e5dcbe65
commit 84eb56d6b1

View File

@ -2441,10 +2441,12 @@ void DiscordClient::StoreMessageData(Message &msg) {
if (msg.Member.has_value())
m_store.SetGuildMember(*msg.GuildID, msg.Author.ID, *msg.Member);
if (msg.Interaction.has_value() && msg.Interaction->Member.has_value()) {
if (msg.Interaction.has_value()) {
m_store.SetUser(msg.Interaction->User.ID, msg.Interaction->User);
if (msg.Interaction->Member.has_value()) {
m_store.SetGuildMember(*msg.GuildID, msg.Interaction->User.ID, *msg.Interaction->Member);
}
}
m_store.EndTransaction();