diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-01-13 20:37:33 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-01-13 20:37:33 -0500 |
commit | 6c4bdb51a3d35542efe377bafb817f9231822d97 (patch) | |
tree | ad7a3fc398bf6bc470559cab124d72d295f99055 | |
parent | 587713f92425fd01cb7ee1322a139b6d7f308a62 (diff) | |
download | abaddon-portaudio-6c4bdb51a3d35542efe377bafb817f9231822d97.tar.gz abaddon-portaudio-6c4bdb51a3d35542efe377bafb817f9231822d97.zip |
fix some parameter ordering
-rw-r--r-- | discord/discord.cpp | 2 | ||||
-rw-r--r-- | discord/store.cpp | 4 |
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)); |