async def star_message(channel_id: int, message_id: int):
# Get Partial Messageable object
partial_channel = bot.get_partial_messageable(channel_id)
# Get Partial Message
partial_message = partial_channel.get_partial_message(message_id)
# Add a reaction
await partial_message.add_reaction(":star:")
The issue is that PartialMessagechecks the incoming type, and PartialMessageable, as constructed and returned by .get_partial_messageable(), is not on that list.
Minimal Reproducible Code
async def star_message(channel_id: int, message_id: int):
# Get Partial Messageable object
partial_channel = bot.get_partial_messageable(channel_id)
# Get Partial Message
partial_message = partial_channel.get_partial_message(message_id)
# Add a reaction
await partial_message.add_reaction(":star:")
await star_message(881224361015672863, 1273298167768682611)
Expected Results
A PartialMessage object is provided for further interaction
Actual Results
An exception is thrown due to PartialMessageable not in the list of valid channel types for PartialMessage
Intents
any
System Information
Python v3.11.9-final
py-cord v2.6.None-final
aiohttp v3.9.5
system info: Darwin 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:08 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8122
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.
Summary
Exception thrown when trying to construct a PartialMessage from a PartialMessageable
Reproduction Steps
A help file for
.partial-objects
in the Pycord Discord states the following:The issue is that
PartialMessage
checks the incoming type, andPartialMessageable
, as constructed and returned by.get_partial_messageable()
, is not on that list.Minimal Reproducible Code
Expected Results
A PartialMessage object is provided for further interaction
Actual Results
An exception is thrown due to
PartialMessageable
not in the list of valid channel types forPartialMessage
Intents
any
System Information
Checklist
Additional Context
No response