Im trying to make a discord bot take a name input and add that name to a google sheet. All i get rn is an error whenever i use the command. Error: Command raised an exception: AttributeError: 'Bot' object has no attribute 'wait_for_message'
@client.command()
async def addguildmember(ctx):
await ctx.send('Enter member name: ')
nameMessage = client.wait_for_message(author=ctx.message.author, timeout=30)
await ctx.send('PaidY/N: ')
paidMessage = client.wait_for_message(author=ctx.message.author, timout=30)
row = [nameMessage,paidMessage,]
index = 2
sheet.insert_row(row , index)
So i have made some changes, it still does not work but it uses the new library you told me about. Now it gives me the error: /usr/lib/python3.8/asyncio/events.py:81: RuntimeWarning: coroutine 'wait_for' was never await ed self._context.run(self._callback, *self._args)
@client.command()
async def addguildmember(ctx):
nameMessage = 'placeholder'
paidMessage = 'placeholder'
await ctx.send('Enter member name: ')
nameMessage = client.wait_for('message', timeout = 30)
#msg = await client.wait_for('message', check=check)
#await ctx.send('Hello {.author}!'.format(msg))
await ctx.send('PaidY/N: ')
paidMessage = client.wait_for('message', timeout = 30)
row = [nameMessage,paidMessage]
index = 2
sheet.insert_row(row , index)
discord.pymodule? Where is your variableclientcreated? - Hymns For Disco