Closed Jack-Development closed 5 years ago
I'm not sure how the title of the issue is relevant. Message ACK refers to marking a message as read for Discord's API. Bots can't use the endpoint that does this, and I don't think they can receive this event. Is this occurring on a self-bot?
As for your described issue, I'm unable to reproduce this.
I'm able to check a message's embeds for a specific title and send a message successfully when it's found.
Is MESSAGE
defined? Are you getting any errors?
Can you give a reproducible example of the embed you're trying to do this with and the code you're using? Specifically, are you sure that 'TITLE_TEXT'
matches the embed title and that the embed isn't using the author name field instead?
For code block usage, see https://help.github.com/articles/creating-and-highlighting-code-blocks/.
I was very confused, but I have now done debugging with the code since the post was made and the error is still prevalent, however the bot is not working with this proceeding it:
if len(message.embeds) != 0:
print(message.embeds[0]['title'])
I have no idea why, but this has made the bot work now, but some errors still popup.
What's the error you're referring to? The Message ACK event? As I said, bot accounts shouldn't be receiving this event. Are you using a self-bot? If that's not what you're referring to, can you provide the full traceback of the errors?
The following error I'm receiving are:
INFO:discord.gateway:Unhandled event SESSIONS_REPLACE INFO:discord.gateway:Unhandled event GUILD_INTEGRATIONS_UPDATE INFO:discord.gateway:Unhandled event MESSAGE_ACK
These aren't appearing very often, or at least as much as they were.
I am running the bot on my own account (I assume that's what you mean by a self-bot?)
Those lines begin with INFO - they are information, not errors. And yes, running it on your own account is called a selfbot. You don't have any errors.
Yes, self-bots on user accounts are forbidden now. You should create a bot account instead.
These aren't errors. They are simply logging messages informing about events that discord.py doesn't handle.
SESSIONS_REPLACE
is an undocumented event that can be safely ignored.
GUILD_INTEGRATIONS_UPDATE
happens when servers update their integrations.
As previously stated, MESSAGE_ACK
is when messages are marked as read and shouldn't be received by bots.
For future questions like this, you should join either the official discord.py server or the Discord API server for help, as the README recommends.
Alright, I will make a bot account now, thank you.
I'm trying to use a bot that produces a prespecified message, but only when it receives a message with a specific 'title' on it, however it isn't being produced when I attempt to search for it.
Code: async def on_message(message): if len(message.embeds) != 0 and message.embeds[0]['title'] == 'TITLE_TEXT': print(message.content) print(message.embeds) await client.send_message(message.channel, MESSAGE)