Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public async Task ViewGameAsync(string gameId, int page = 1)
 {
     await Context.Channel.SendMessageAsync(GameViewer.ViewGame(_games.GetGame(gameId), --page, Context.Account));
 }
Exemplo n.º 3
0
 public async Task ViewInvitesAsync(int page = 1)
 {
     page--;
     await Context.Channel.SendMessageAsync(GameViewer.ViewInvites(Context.Account, _games, page));
 }
Exemplo n.º 4
0
 public async Task ViewGamesAsync(int page = 1)
 {
     await Context.Channel.SendMessageAsync(GameViewer.ViewGames(_games, --page, Context.Account));
 }