@client.command(name="command")
async def _command(ctx):
global times_used
await ctx.send(f"y or n")
# This will make sure that the response will only be registered if the following
# conditions are met:
def check(msg):
return msg.author == ctx.author and msg.channel == ctx.channel and
msg.content.lower() in ["y", "n"]
msg = await client.wait_for("message", check=check)
if msg.content.lower() == "y":
await ctx.send("You said yes!")
else:
await ctx.send("You said no!")
times_used = times_used + 1
if "A!clear".lower() in str(message.content).lower():
n=[int(i) for i in message.content.split() if i.isdigit()]
#n is a list of numbers that you pass it to other attributes
#in on_message or any other method you can split the code and make the bot read it,
#I just wanted to give the insight to you