public async Task RefreshAppointments(CommandContext commandContext, DiscordUser discordUser)
        {
            await UserManagementService.CheckDiscordAccountAsync(discordUser.Id)
            .ConfigureAwait(false);

            await commandContext.Message
            .CreateReactionAsync(DiscordEmojiService.GetCheckEmoji(commandContext.Client))
            .ConfigureAwait(false);
        }
    public Task RemindMeIn(CommandContext commandContext, string timeSpan, [RemainingText] string message = null)
    {
        return(InvokeAsync(commandContext,
                           async commandContextContainer =>
        {
            var checkUser = UserManagementService.CheckDiscordAccountAsync(commandContext.User.Id);

            var timeSpanValidation = new Regex(@"\d+(h|m|s)");
            if (timeSpanValidation.IsMatch(timeSpan))
            {
                var amount = Convert.ToUInt64(timeSpan[..^ 1], CultureInfo.InvariantCulture);
Exemple #3
0
    public Task Remove(CommandContext commandContext)
    {
        return(InvokeAsync(commandContext,
                           async commandContextContainer =>
        {
            await UserManagementService.CheckDiscordAccountAsync(commandContextContainer.User.Id)
            .ConfigureAwait(false);

            await AdministrationService.Remove(commandContextContainer)
            .ConfigureAwait(false);
        }));
    }