Issue: When I set up on_message
then the sendGif command does not work. When I comment out on_message
then it works perfectly.
My Code:
bot = commands.Bot(command_prefix='!')
#----------------------------------------------------------#
@bot.event
async def on_message(message):
if message.author == bot.user:
return
content = message.content
print(content)
if "test" in content:
await message.channel.send("You test" + message.author.mention)
await message.add_reaction(":haha:")
else:
pass
#----------------------------------------------------------#
@bot.command()
async def sendGif(ctx, link):
embed = discord.Embed(title="Embed GIF")
embed.set_thumbnail(url="Gif Link here")
await ctx.send(embed=embed)