I am trying to make a discord bot. However some of my commands have had to be done on the outdated on_message
event because they wont work under the commands extension. Is there any line of code i need to add to make the command extension work at the same time. What i mean is i have some on_message
events and when i add a @client.command
to the end of the code the @client.command
commands wont respond.
Here is an example code of what i am trying to achieve here.
@client.event
async def on_message(message):
if message.content.startswith('ggg'):
print('hello')
elif message.content.startswith('hello')
print('hello')
@client.command()
async def example():
print('hello')
Obviously the code would be more developed. That was just an example.