Fix guild settings being stored incorrectly

This commit is contained in:
Noi 2020-05-21 21:19:18 -07:00
parent 7f8c722b3d
commit 5d915f9ca0

View file

@ -391,7 +391,7 @@ namespace BirthdayBot.Data
+ "announce_message_pl = @AnnounceMsgPl, " + "announce_message_pl = @AnnounceMsgPl, "
+ "announce_ping = @AnnouncePing " + "announce_ping = @AnnouncePing "
+ "where guild_id = @Gid"; + "where guild_id = @Gid";
c.Parameters.Add("@Gid", NpgsqlDbType.Bigint).Value = (ulong)GuildId; c.Parameters.Add("@Gid", NpgsqlDbType.Bigint).Value = (long)GuildId;
NpgsqlParameter p; NpgsqlParameter p;
p = c.Parameters.Add("@RoleId", NpgsqlDbType.Bigint); p = c.Parameters.Add("@RoleId", NpgsqlDbType.Bigint);
@ -406,7 +406,7 @@ namespace BirthdayBot.Data
if (_tz != null) p.Value = _tz; if (_tz != null) p.Value = _tz;
else p.Value = DBNull.Value; else p.Value = DBNull.Value;
c.Parameters.Add("@Moderated", NpgsqlDbType.Text).Value = _moderated; c.Parameters.Add("@Moderated", NpgsqlDbType.Boolean).Value = _moderated;
p = c.Parameters.Add("@ModRole", NpgsqlDbType.Bigint); p = c.Parameters.Add("@ModRole", NpgsqlDbType.Bigint);
if (ModeratorRole.HasValue) p.Value = (long)ModeratorRole.Value; if (ModeratorRole.HasValue) p.Value = (long)ModeratorRole.Value;