So I want to make my bot allow specific messages, like "/verify" in a specifc channel, if someone sent a message other than "verify" the bot should delete the message, however only in a specific channel, I'm new to all of that but I made this code and it's not working
async def verify(ctx):
user = ctx.message.author
role = 'Member' #change the role here
try:
await user.add_roles(discord.utils.get(user.guild.roles, name=role))
await ctx.send('Welcome to our server! :white_check_mark:', delete_after=1)
except Exception as e:
await ctx.send('Cannot assign role. Error: ' + str(e))
if not msg.content == '/verify':
await client.delete_message(msg)
await ctx.message.delete()
any help would be much appreciated.