コード例 #1
0
ファイル: GameCommands.cs プロジェクト: ADVENTdev/Jerry-Rigg
        public async Task LobbyCommand(string op, [Optional, Remainder] string arg1)
        // FIXME:
        // make ASYNC
        // DM is staff-only
        {
            op = op?.ToLower();
            switch (op)
            {
            case "create":     //lobby create [chess]
                await LobbyManager.Create(arg1);

                break;

            case "invite":     //lobby invite Noel-chan
                await LobbyManager.Invite(arg1);

                break;

            case "delete":     //lobby delete
                await LobbyManager.Delete();

                break;

            case "kick":     //lobby kick user
                await LobbyManager.Kick(arg1);

                break;

            case "setgame":
            case "game":     //lobby game uno
                await LobbyManager.SetGame(arg1);

                break;

            case "leave":     //lobby leave
                await LobbyManager.Leave();

                break;

            case "start":     //lobby start
                await LobbyManager.StartGame();

                break;

            case "join":     //lobby join
            case "accept":   //lobby accept
                await LobbyManager.Accept();

                break;

            case "decline":
                await LobbyManager.Decline();

                break;

            case "settings":     //lobby settings round-time=180
                await LobbyManager.Settings(arg1);

                break;

            default:
                Lobby lobby = LobbyManager.GetLobby();
                if (lobby != null)
                {
                    await Context.Channel.SendEmbedAsync(ToEmbedBuilder(lobby));
                }
                break;
            }
        }
コード例 #2
0
ファイル: GameCommands.cs プロジェクト: ADVENTdev/Jerry-Rigg
 public async Task QuitLobby()
 {
     await LobbyManager.Leave();
 }