bisti
bisti

Reputation: 23

Get content from emeded message?

so im trying to make a "disboard reminder bot"

but disboard sends a emeded message that i dont understand how to read with my custom bot... this is what i have: but its just for plain text..

@bot.event
async def on_message(message):
  if "Check it on DISBOARD:" in message.content: #and message.author.id == 302050872383242240:
    print("I see the bump!")
    await message.add_reaction(emoji='⏱️')
    print("counting now!")
    await asyncio.sleep(7200)
    print("sending reminder!")
    await message.channel.send("Remember to bump the server!")

Upvotes: 2

Views: 129

Answers (1)

Just for fun
Just for fun

Reputation: 4225

You need to check the description of the embed

@bot.event
async def on_message(message):
  if message.author.bot and message.embeds:
    if "Check it on DISBOARD:" in message.embeds[0].description: #and message.author.id == 302050872383242240:
      print("I see the bump!")
      await message.add_reaction(emoji='⏱️')
      print("counting now!")
      await asyncio.sleep(7200)
      print("sending reminder!")
      await message.channel.send("Remember to bump the server!")

Upvotes: 2

Related Questions