@client.command() async def setup(ctx): await ctx.send('Setting up game') await client.change_presence(status=discord.Status.online,activity=discord.Game('Secret Hitler')) await ctx.send('How many players? Type ! followed by the number of players') @client.event async def on_message(message): global numPlayers if message.content == '!5': numPlayers = 5 await ctx.send('{} players selected'.format(numPlayers)) if message.content == '!6': numPlayers = 6 await ctx.send('{} players selected'.format(numPlayers)) if message.content == '!7': numPlayers = 7 await ctx.send('{} players selected'.format(numPlayers)) if message.content == '!8': numPlayers = 8 await ctx.send('{} players selected'.format(numPlayers)) if message.content == '!9': numPlayers = 9 await ctx.send('{} players selected'.format(numPlayers)) if message.content == '!10': numPlayers = 10 await ctx.send('{} players selected'.format(numPlayers)) @client.command() async def debug(ctx): print('{} numPlayers var'.format(numPlayers)) await ctx.send('{} numPlayers var'.format(numPlayers))