I'm making my own discord bot. The bot sends a message once a user sends -find
I want the bot to wait for the user to respond to it. The bot waits, but it doesn't recognize the messages.
@commands.command()
async def find(self, ctx):
members = [self.xxx, self.xxx, self.xxx]
member = random.choice(members)
image = member[0]
await ctx.send(f'{image}')
def check(m):
m.author == ctx.author and m.channel == ctx.channel
try:
await self.client.wait_for('message', timeout=8.0, check=check)
await ctx.send('yay!')
except:
await ctx.send('booo you suck')
try: @commands.command()
async def find(self, ctx):
members = [self.xxx, self.xxx, self.xxx]
member = random.choice(members)
image = member[0]
await ctx.send(f'{image}')
def check(m):
m.author == ctx.author and m.channel == ctx.channel
await self.client.wait_for('message', timeout=8.0, check=check)
await ctx.send('yay!')
except:
await ctx.send('booo you suck')
There were no errors. I removed the try, except to see if there were any errors, but the only error that shows is timeout.