1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-18 11:44:45 +03:00

Rename solution & project, move the project files one layer up

This commit is contained in:
Octol1ttle 2023-01-18 20:17:33 +05:00
parent b486d2d3d9
commit c220a0f379
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
27 changed files with 52 additions and 76 deletions

23
Commands/RemindCommand.cs Normal file
View file

@ -0,0 +1,23 @@
using Boyfriend.Data;
namespace Boyfriend.Commands;
public sealed class RemindCommand : ICommand {
public string[] Aliases { get; } = { "remind", "reminder", "remindme", "напомни", "напомнить", "напоминание" };
public Task RunAsync(CommandProcessor cmd, string[] args, string[] cleanArgs) {
// TODO: actually make this good
var remindIn = CommandProcessor.GetTimeSpan(args, 0);
var reminderText = cmd.GetRemaining(cleanArgs, 1, "ReminderText");
if (reminderText is not null)
GuildData.Get(cmd.Context.Guild).MemberData[cmd.Context.User.Id].Reminders.Add(new Reminder {
RemindAt = DateTimeOffset.Now.Add(remindIn),
ReminderText = reminderText,
ReminderChannel = cmd.Context.Channel.Id
});
cmd.ConfigWriteScheduled = true;
return Task.CompletedTask;
}
}