示例#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
示例#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
示例#3
0
文件: bot.py 项目: dwwmmn/discord_bot
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
示例#4
0
import randomGameGenerator

print(randomGameGenerator.getList(3))