Пример #1
0
            public async Task Create(string name, DateTime startDate, DateTime endDate)
            {
                if (_welcomeService.CheckDateRangeForProfile(startDate, endDate, out var foundStage))
                {
                    await ReplyAsync($":warning: Stage `{foundStage.Key}` is already in that date range");

                    return;
                }

                if (!_welcomeService.TryCreateProfile(name, startDate, endDate, out var profile))
                {
                    await ReplyAsync(":warning: A profile already exists by that name");

                    return;
                }

                await Context.Message.AddReactionAsync(thumbsUpUnicode);
            }