Ejemplo n.º 1
0
 public async Task EndMeetingCommand(CommandContext ctx)
 {
     if (CrabgileMeeting.IsDiscordUserMeetingHost(ctx.Member))
     {
         await CrabgileMeeting.GetMeetingFromHost(ctx.Member).CloseMeeting();
     }
     else
     {
         await ctx.RespondAsync($"I'm afraid there's no meeting in progress, {ctx.Member.Mention}!");
     }
     await TryDeleteUserMessage(ctx);
 }
Ejemplo n.º 2
0
        public async Task MeetingCommand(CommandContext ctx)
        {
            await ctx.RespondAsync($"Creating a meeting...\n**Type !end to close the meeting, {ctx.Member.Mention}.**");

            if (!CrabgileMeeting.IsDiscordUserMeetingHost(ctx.Member))
            {
                CrabgileMeeting meeting = new CrabgileMeeting(ctx.Member);
                meeting.AddChannelToMeeting(await ctx.Guild.CreateVoiceChannelAsync("Meeting Voice", await meeting.GetMeetingCategory()));
            }
            else
            {
                await ctx.RespondAsync($"You are already hosting a meeting, {ctx.Member.Mention}!");
            }
            await TryDeleteUserMessage(ctx);
        }
Ejemplo n.º 3
0
        public async Task TimeboxCommand(CommandContext ctx, int time)
        {
            await ctx.RespondAsync($"Creating a {time} minute timebox...\n**Type !begin to start the timebox session, {ctx.Member.Mention}.**\n*(Alternatively, you can type !end to end the meeting prematurely.)*");

            if (!CrabgileMeeting.IsDiscordUserMeetingHost(ctx.Member))
            {
                new CrabgileTimebox(ctx.Member, time);
            }
            else
            {
                await ctx.RespondAsync($"You are already hosting a meeting, {ctx.Member.Mention}!");
            }

            await TryDeleteUserMessage(ctx);
        }