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,9 +2441,11 @@ 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);
m_store.SetGuildMember(*msg.GuildID, msg.Interaction->User.ID, *msg.Interaction->Member);
if (msg.Interaction->Member.has_value()) {
m_store.SetGuildMember(*msg.GuildID, msg.Interaction->User.ID, *msg.Interaction->Member);
}
}
m_store.EndTransaction();