pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Message object and stickers

Open Modusmundi opened this issue 3 years ago • 4 comments

Summary

Message object doesn't contain sticker information

Reproduction Steps

In general, stickers do not seem to be accessible through message even though they are sent as messages by a user. Example code:

@bot.event async def on_message(message): print("--------") print(f"{message}") print(f"{message.content}") print(f"{message.embeds}") print(f"{message.attachments}") print(f"{message.components}") print("--------") ...

Returns the following:

STICKER WITH MESSAGE
--------
<Message id=SNIP channel=<TextChannel id=SNIP name='general' position=10 nsfw=True category_id=SNIP news=False> type=<MessageType.default: 0> author=<Member id=SNIP name='Testing' discriminator='5555' bot=False nick='LOL TESTING' guild=<Guild id=SNIP name='SNIP' shard_id=0 chunked=True member_count=555>> flags=<MessageFlags value=0>>
Test
[]
[]
[]
--------

STICKER WITH NO MESSAGE

--------
<Message id=SNIP channel=<TextChannel id=SNIP name='general' position=10 nsfw=True category_id=SNIP news=False> type=<MessageType.default: 0> author=<Member id=SNIP name='Testing' discriminator='5555' bot=False nick='LOL TESTING' guild=<Guild id=SNIP name='SNIP' shard_id=0 chunked=True member_count=555>> flags=<MessageFlags value=0>>

[]
[]
[]
--------

Minimal Reproducible Code

@bot.event
async def on_message(message):
    print("--------")
    print(f"{message}")
    print(f"{message.content}")
    print(f"{message.embeds}")
    print(f"{message.attachments}")
    print(f"{message.components}")
    print("--------")
...

Expected Results

Expected sticker used to be accessible from message object.

Actual Results

Bot is sufficiently privileged to receive this data as far as I am aware in my test- E.G.: It can appropriately see attachments, embeds, etc. (I presume components because I don't have a good test for it).

API documentation and library does not seem to have a way to derive this information. I could be, as they say, doing it wrong.

Intents

Tested with administrative/full intents.

System Information

image

Currently using 2.2.2, need to move to 2.4.0 but as far as I can tell in the documentation moving to 2.4.0 would not resolve this issue.

Checklist

  • [X] I have searched the open issues for duplicates.
  • [X] I have shown the entire traceback, if possible.
  • [X] I have removed my token from display, if visible.

Additional Context

You folks are great.

Modusmundi avatar Feb 28 '23 22:02 Modusmundi

sticker is neither in content nor the other fields. read the docs

Lulalaby avatar Feb 28 '23 22:02 Lulalaby

Okay, sure- I didn't see it in the documents, can you give me an example of where it would be?

Modusmundi avatar Feb 28 '23 22:02 Modusmundi

https://docs.pycord.dev/en/stable/api/models.html#discord.Message.stickers

Lulalaby avatar Feb 28 '23 22:02 Lulalaby

Unsure how I missed that, I've spent probably a half hour off and on looking through at the message object. Thanks!

Modusmundi avatar Feb 28 '23 22:02 Modusmundi