Reputation: 23
When ever it picks up message content from a webhook/bot/embed it would always send a blank line/whitespace, I wanted to know if it was possible for my discord bot to see the content of these webhook/bot/embed.
import discord
client = discord.Client()
@client.event
async def on_ready():
print('Logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
if message.author.bot == True:
print(message.content)
Upvotes: 1
Views: 1774
Reputation: 413
if len(message.embeds) > 0:
embed = message.embeds[0] #you can do embed.title to get the title and other details of the embed now
if message.author.bot and message.author != client.user:
msg = message.content
if message.webhook_id:
msg = message.content
Upvotes: 1