1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-04 13:06:29 +03:00

Finish adapting code to new guild data storage

This commit is contained in:
Octol1ttle 2023-01-16 20:33:02 +05:00
parent 587e5d11f9
commit 1f45a605d7
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
17 changed files with 201 additions and 96 deletions

View file

@ -7,11 +7,12 @@ public sealed class RemindCommand : ICommand {
public Task RunAsync(CommandProcessor cmd, string[] args, string[] cleanArgs) {
var remindIn = CommandProcessor.GetTimeSpan(args, 0);
var reminderText = cmd.GetRemaining(args, 1, "ReminderText");
var reminderText = cmd.GetRemaining(cleanArgs, 1, "ReminderText");
if (reminderText is not null)
GuildData.FromSocketGuild(cmd.Context.Guild).MemberData[cmd.Context.User.Id].Reminders.Add(new Reminder {
GuildData.Get(cmd.Context.Guild).MemberData[cmd.Context.User.Id].Reminders.Add(new Reminder {
RemindAt = DateTimeOffset.Now.Add(remindIn),
ReminderText = reminderText
ReminderText = reminderText,
ReminderChannel = cmd.Context.Channel.Id
});
return Task.CompletedTask;