예제 #1
0
        public async Task ViewServersAsync(int page = 1) // use the page to view through multiple servers, if there is too many to show on one page
        {
            if (!_games.GetServersFor(Context.User.Id, Context.Guild?.Id ?? 0).Any())
            {
                await Context.Channel.SendMessageAsync(Format.Warning("There aren't any public game servers to show.")).ConfigureAwait(false);

                return;
            }

            await Context.Channel.SendMessageAsync(GameViewer.View(_games.GetServersFor(Context.User.Id, Context.Guild?.Id ?? 0), page - 1)).ConfigureAwait(false);
        }
예제 #2
0
 public async Task ViewGameAsync(string gameId, int page = 1)
 {
     await Context.Channel.SendMessageAsync(GameViewer.ViewGame(_games.GetGame(gameId), --page, Context.Account));
 }
예제 #3
0
 public async Task ViewInvitesAsync(int page = 1)
 {
     page--;
     await Context.Channel.SendMessageAsync(GameViewer.ViewInvites(Context.Account, _games, page));
 }
예제 #4
0
 public async Task ViewGamesAsync(int page = 1)
 {
     await Context.Channel.SendMessageAsync(GameViewer.ViewGames(_games, --page, Context.Account));
 }