fix some parameter ordering

This commit is contained in:
ouwou 2021-01-13 20:37:33 -05:00
parent 587713f924
commit 6c4bdb51a3
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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));