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:
parent
587e5d11f9
commit
1f45a605d7
17 changed files with 201 additions and 96 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue