Esempio n. 1
0
async def listGames(ctx, playerCount):
    #returns list of all games with given player count
    print(ctx.author)
    print(ctx.author.id)
    if(userCheck(ctx, str(ctx.author.id))):
        return
    gamesList = randomGameGenerator.getList(playerCount)
    await ctx.gamesList
Esempio n. 2
0
async def randomGame(ctx, playerCount):
    #takes in number of players and returns an appropriate game
    print(ctx.author)
    print(ctx.author.id)
    if(userCheck(ctx, str(ctx.author.id))):
        return
    gamesList = randomGameGenerator.getList(playerCount)
    game = random.choice(gamesList)
    await ctx.game
Esempio n. 3
0
def Process_Command(command):
  if command.startswith("randomGame"):
    players = int(command[len("randomGame"):])
    gamesList = randomGameGenerator.getList(players)
    print(str(players))
    print(gamesList)
    if gamesList != []:
      game = random.choice(gamesList)
      return game
    else:
      return "No games found for " + str(players) + " players."
  return
Esempio n. 4
0
import randomGameGenerator

print(randomGameGenerator.getList(3))