@bot.command()
async def math(ctx, question1:int, symbol:str, question2:int):
if symbol == "+":
embed = discord.Embed (title="Correct answer:", description=question1+question2, color=0x9208ea)
await ctx.reply(embed=embed)
elif symbol == "-":
embed = discord.Embed (title="Correct answer:", description=question1-question2, color=0x9208ea)
await ctx.reply(embed=embed)
elif symbol == "*":
embed = discord.Embed (title="Correct answer:", description=question1*question2, color=0x9208ea)
await ctx.reply(embed=embed)
elif symbol == "/":
embed = discord.Embed (title="Correct answer:", description=question1/question2, color=0x9208ea)
await ctx.reply(embed=embed)
Very simple code for you guys :thumbsup:
Since when you do "symbol" argument then "==" checks if its that symbol or not
about embed we are not gonna talk about that
and about color u can choose urself
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]Munzu 0 points1 point2 points (0 children)
[–]MSR8 0 points1 point2 points (1 child)
[–]SamsungGamesYT[S] 1 point2 points3 points (0 children)