Beispiel #1
0
        public async Task Confirm([Remainder] string eventName)
        {
            if (!await _permissionService.AuthorIsModerator(Context))
            {
                return;
            }

            var existingEvent = await _events.GetActiveEvent(eventName, Context.Guild.Id);

            if (existingEvent == null)
            {
                await Context.Channel.SendMessageAsync($"Unable to find an active event with the name {eventName}");

                return;
            }

            var message = await Context.Channel.SendMessageAsync("Starting Confirmation Check..");

            await _confirmationChecks.SaveAsync(new ConfirmationCheck()
            {
                EventId   = existingEvent.Id,
                MessageId = message.Id.ToString()
            });

            await _confirmationCheckPrinter.WriteMessage(this.Context.Channel, message, existingEvent);
        }