From 26973f1b1470b4d381e493ad10da0d5daea8d982 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Mon, 12 Jun 2023 04:08:16 -0400 Subject: basic pomelo support --- src/discord/store.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/discord/store.cpp') diff --git a/src/discord/store.cpp b/src/discord/store.cpp index 41b2069..24b686a 100644 --- a/src/discord/store.cpp +++ b/src/discord/store.cpp @@ -438,6 +438,7 @@ void Store::SetUser(Snowflake id, const UserData &user) { s->Bind(7, user.IsMFAEnabled); s->Bind(8, user.PremiumType); s->Bind(9, user.PublicFlags); + s->Bind(10, user.GlobalName); if (!s->Insert()) fprintf(stderr, "user insert failed for %" PRIu64 ": %s\n", static_cast(id), m_db.ErrStr()); @@ -1109,6 +1110,7 @@ std::optional Store::GetUser(Snowflake id) const { s->Get(6, r.IsMFAEnabled); s->Get(7, r.PremiumType); s->Get(8, r.PublicFlags); + s->Get(9, r.GlobalName); s->Reset(); @@ -1233,7 +1235,8 @@ bool Store::CreateTables() { system BOOL, mfa BOOL, premium INTEGER, - pubflags INTEGER + pubflags INTEGER, + global_name TEXT ) )"; @@ -1797,7 +1800,7 @@ bool Store::CreateStatements() { m_stmt_set_user = std::make_unique(m_db, R"( REPLACE INTO users VALUES ( - ?, ?, ?, ?, ?, ?, ?, ?, ? + ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) )"); if (!m_stmt_set_user->OK()) { -- cgit v1.2.3