I'm coding a roulette command on Discord.py 1.7, and I have it choosing a number, and then seeing if the number is even or odd. If I choose even when doing the command, and the number chosen by the code is even, it sends a win message. Same thing for when they are both odd. The problem occurs when I choose even and the code chooses odd. When that happens it still shows the win message. I am even more confused because when I choose odd and the code chooses even, it shows the lose message. here is my code
choices = ['odd','even']
@slash.slash(description='A staple of gambling')
async def roulette(ctx,bet:int,choice):
if choice == int:
await ctx.send('Sorry, you cannot bet on singular numbers yet. this will be added soon')
elif any(word in choice for word in choices):
q = await ctx.send('Bets are in place!\nresults revealed in: 3 seconds')
await asyncio.sleep(1)
await q.edit(content='Bets are in place!\nresults revealed in: 2 seconds')
await asyncio.sleep(1)
await q.edit(content='Bets are in place!\nresults revealed in: 1 second')
await asyncio.sleep(1)
e = random.randint(0,36)
if e == 0 or 2 or 4 or 6 or 8 or 10 or 12 or 14 or 16 or 18 or 20 or 22 or 24 or 26 or 28 or 30 or 32 or 34 or 36:
if choice == 'even':
win = int(bet) * 2
await q.edit(content=f'Number:{e}\nYou win {ctx.author.mention}!!!\n\nYou bet {bet}, and win double your money!!!\n{win}')
if choice == 'odd':
await q.edit(content=f'Number:{e}\nSorry {ctx.author.mention}, you lost your bet!')
elif e == 1 or 3 or 5 or 7 or 9 or 11 or 13 or 15 or 17 or 19 or 21 or 23 or 25 or 27 or 29 or 31 or 33 or 35:
if choice == 'odd':
win = int(bet) * 2
await q.edit(content=f'Number:{e}\nYou win {ctx.author.mention}!!!\n\nYou bet {bet}, and win double your money!!!\n{win}')
if choice == 'even':
await q.edit(content=f'Number:{e}\nSorry {ctx.author.mention}, you lost your bet!')
else:
await ctx.send(f'sorry {ctx.author.mention}, that is not a valid choice. Valid choices: {choices}')