从 emeded 消息中获取内容?
Get content from emeded message?
所以我正在尝试制作一个“disboard reminder bot”
但是 disboard 发送了一条 emeded 消息,我不明白如何用我的自定义机器人阅读...
这就是我所拥有的:但它仅适用于纯文本..
@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!")
您需要检查嵌入的描述
@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!")
所以我正在尝试制作一个“disboard reminder bot”
但是 disboard 发送了一条 emeded 消息,我不明白如何用我的自定义机器人阅读... 这就是我所拥有的:但它仅适用于纯文本..
@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!")
您需要检查嵌入的描述
@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!")