Skip to content

[BUG] Undocumented MessageType code on poll result messages #1731

Closed
@retr0-init

Description

@retr0-init

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 feat: Add poll result embed type #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

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.
  • I have attempted to debug this myself, and I believe this issue is with the library

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions