diff --git a/DeukBot4/Database/ReminderHandler.cs b/DeukBot4/Database/ReminderHandler.cs index 2427464..8bc33ef 100644 --- a/DeukBot4/Database/ReminderHandler.cs +++ b/DeukBot4/Database/ReminderHandler.cs @@ -21,10 +21,10 @@ namespace DeukBot4.Database db.SortedSetAddAsync("deukbot_reminders", (RedisValue)id, expectedTime.ToBinary()); db.HashSetAsync((RedisKey) id, new[] { - new HashEntry("channel", channel), + new HashEntry("channel", channel.ToString()), new HashEntry("message", message), - new HashEntry("author", author), - new HashEntry("recipient", recipient), + new HashEntry("author", author.ToString()), + new HashEntry("recipient", recipient.ToString()), }); } catch (Exception e) @@ -52,10 +52,10 @@ namespace DeukBot4.Database string message = null; foreach (var hashEntry in data) { - if (hashEntry.Name == "channel") channel = (ulong) hashEntry.Value; + if (hashEntry.Name == "channel") channel = ulong.Parse(hashEntry.Value); else if (hashEntry.Name == "message") message = hashEntry.Value; - else if (hashEntry.Name == "author") author = (ulong) hashEntry.Value; - else if (hashEntry.Name == "recipient") recipient = (ulong) hashEntry.Value; + else if (hashEntry.Name == "author") author = ulong.Parse(hashEntry.Value); + else if (hashEntry.Name == "recipient") recipient = ulong.Parse(hashEntry.Value); } var diff = time - DateTime.UtcNow; FireReminderAtTime((int) diff.TotalSeconds, channel, message, author, recipient);