0

So I was making a event that will delete invites if the user doesn't have the role. I use the following code

async def on_message(message):

    if 'discord.gg' in message.content:
        bypassrole = discord.utils.get(message.guild.roles, name="Admin")
        if bypassrole in message.author.roles:

        else:
            await message.delete()
            await message.channel.send("You cannot post invite links.")

It's all fine, works great, but for some reason, it breaks my bot from sending any embeds. No errors are outputted, it just doesnt work.

Any help would be great.


Embed code:

    @client.command()
    async def help(ctx):
        await ctx.message.delete()
        helpem = discord.Embed(title="Help",
                               description="**Coming Soon**",
                               color=13051944)
        helpem.set_footer(text="Smart Tech")
        await ctx.channel.send(embed=helpem)


CryptoFool
  • 21,719
  • 5
  • 26
  • 44
Firework
  • 219
  • 2
  • 15

0 Answers0