interactions.py icon indicating copy to clipboard operation
interactions.py copied to clipboard

[BUG] Undocumented `MessageType` code on poll result messages

Open retr0-init opened this issue 1 year ago • 1 comments

Library Version

5.13.1

Describe the Bug

I was working on #1730 This yields another message:

Class `MessageType` received an invalid and unexpected value `46`, a new enum item will be created to represent this value. Please update interactions.py or report this issue on GitHub - https://github.com/interactions-py/interactions.py/issues

I think this is the poll_result message type. However, it is not shown on the official documentation on https://discord.com/developers/docs/resources/message#message-object-message-types

Re:

We usually don't add undocumented features.

Therefore, this is just to be kept in place and make changes as soon as there is an update on the official document.

Steps to Reproduce

  1. Create a poll and end it.
  2. Try to go through the message history with the minimal reproducible code with the fixes in #1730 .

Expected Results

It will generate the following error:

Class `MessageType` received an invalid and unexpected value `46`, a new enum item will be created to represent this value. Please update interactions.py or report this issue on GitHub - https://github.com/interactions-py/interactions.py/issues

Minimal Reproducible Code

@interactions.slash_command(
    "test", description="test command", scopes=[DEV_GUILD] if DEV_GUILD else None
)
async def test_cmd(self, ctx: interactions.SlashContext):
    """Register as an extension command"""
    async for msg in ctx.channel.history(10):
        ...

Traceback

Class `MessageType` received an invalid and unexpected value `46`, a new enum item will be created to represent this value. Please update interactions.py or report this issue on GitHub - https://github.com/interactions-py/interactions.py/issues

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.
  • [X] I have attempted to debug this myself, and I believe this issue is with the library

Additional Information

No response

retr0-init avatar Aug 09 '24 00:08 retr0-init