[Solved] Simple head and tails bot [closed]


As Scott said, result is defined inside the flip function. I haven’t really used async before, but probably this will work for you.

  1. Take out the return statement
  2. Tab the following lines.

    elif message.content.startswith(config.prefix + 'coinflip'):
        result = random.randint(0, 1)
    
        if result == 1:
            print('Heads!')
            await client.send_message(message.channel, content="Heads!") 
        else:
            print('Tails!')
            await client.send_message(message.channel, content="Tails!") 
    

1

solved Simple head and tails bot [closed]