summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/discord.cpp2
-rw-r--r--discord/store.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/discord/discord.cpp b/discord/discord.cpp
index 008308f..4e1a35e 100644
--- a/discord/discord.cpp
+++ b/discord/discord.cpp
@@ -188,7 +188,7 @@ std::optional<EmojiData> DiscordClient::GetEmoji(Snowflake id) const {
}
Snowflake DiscordClient::GetMemberHoistedRole(Snowflake guild_id, Snowflake user_id, bool with_color) const {
- const auto data = GetMember(guild_id, user_id);
+ const auto data = GetMember(user_id, guild_id);
if (!data.has_value()) return Snowflake::Invalid;
std::vector<RoleData> roles;
diff --git a/discord/store.cpp b/discord/store.cpp
index 29601a1..9b4ea50 100644
--- a/discord/store.cpp
+++ b/discord/store.cpp
@@ -411,8 +411,8 @@ std::optional<GuildData> Store::GetGuild(Snowflake id) const {
}
std::optional<GuildMember> Store::GetGuildMember(Snowflake guild_id, Snowflake user_id) const {
- Bind(m_get_member_stmt, 1, guild_id);
- Bind(m_get_member_stmt, 2, user_id);
+ Bind(m_get_member_stmt, 1, user_id);
+ Bind(m_get_member_stmt, 2, guild_id);
if (!FetchOne(m_get_member_stmt)) {
if (m_db_err != SQLITE_DONE)
fprintf(stderr, "error while fetching member: %s\n", sqlite3_errstr(m_db_err));