mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-24 01:14:12 +00:00
Fix time zone unset when updating birthday (#26)
This commit is contained in:
parent
3729474525
commit
1f6772d18a
1 changed files with 1 additions and 2 deletions
|
@ -3,7 +3,6 @@ using Discord.Interactions;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace BirthdayBot.ApplicationCommands;
|
namespace BirthdayBot.ApplicationCommands;
|
||||||
|
|
||||||
[RequireGuildContext]
|
[RequireGuildContext]
|
||||||
[Group("birthday", HelpCmdBirthday)]
|
[Group("birthday", HelpCmdBirthday)]
|
||||||
public class BirthdayModule : BotModuleBase {
|
public class BirthdayModule : BotModuleBase {
|
||||||
|
@ -47,7 +46,7 @@ public class BirthdayModule : BotModuleBase {
|
||||||
if (user.IsNew) db.UserEntries.Add(user);
|
if (user.IsNew) db.UserEntries.Add(user);
|
||||||
user.BirthMonth = inmonth;
|
user.BirthMonth = inmonth;
|
||||||
user.BirthDay = inday;
|
user.BirthDay = inday;
|
||||||
user.TimeZone = inzone;
|
user.TimeZone = inzone ?? user.TimeZone;
|
||||||
try {
|
try {
|
||||||
await db.SaveChangesAsync();
|
await db.SaveChangesAsync();
|
||||||
} catch (Microsoft.EntityFrameworkCore.DbUpdateException e)
|
} catch (Microsoft.EntityFrameworkCore.DbUpdateException e)
|
||||||
|
|
Loading…
Reference in a new issue