Пример #1
0
            public async Task ChangeGameCommand(int status, [Remainder] string game)
            {
                if (status < 1 || status > 4)
                {
                    await Respond.SendResponse(Context, "Status can only be between **1-4**!");

                    return;
                }

                BotConfigService.SetDefaultActivity(status, game);

                switch (status)
                {
                case 1:
                    await Context.Client.SetGameAsync(game, type : ActivityType.Playing);

                    break;

                case 2:
                    await Context.Client.SetGameAsync(game, type : ActivityType.Listening);

                    break;

                case 3:
                    await Context.Client.SetGameAsync(game, type : ActivityType.Watching);

                    break;

                case 4:
                    await Context.Client.SetGameAsync(game, "https://www.twitch.tv/", ActivityType.Streaming);

                    break;

                default:
                    await Respond.SendResponse(Context, "Please limit activity `1-4`.");

                    break;
                }
            }