Exemple #1
0
        public async Task ActiveEvents()
        {
            var activeEvents = await _events.GetActiveEvents(Context.Guild.Id, Context.Channel.Id);

            if (!activeEvents.Any())
            {
                await Context.Channel.SendMessageAsync($"There's no events currently running for {Discord.MentionUtils.MentionChannel(Context.Channel.Id)}.");
            }
            else
            {
                await Context.Channel.SendMessageAsync($"Currently active events:{Environment.NewLine}{string.Join(Environment.NewLine, activeEvents.Select(ev => $"{ev.Name}{(ev.SpaceLimited ? $" - {ev.ParticipantCount}/{ev.Capacity} participants" : "")}"))}");

                await Context.Channel.SendMessageAsync($"Join any active event with the command `!event signup event name`");
            }
        }