-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permissions in message update event sent as a number #6862
Comments
are you sure that you're using api v10? |
I'm using https://github.com/disgoorg/disgo which is running on API v10, yes |
can you send steps that reproduce this problem? i used discord.py (v2.4, master branch) but doesn't seem to reproducible for me with editing origin message as response to interaction, nor usual edit channel message |
not right now, no. this event was caused by a 3rd party bot (Dank Memer) |
looks if responder uses api v7, >=v8 receivers will get same payload as v7: from discord import ui
class Setup(ui.View):
@ui.select(placeholder='Setting', options=[
discord.SelectOption(label='Foo', value='foo'),
discord.SelectOption(label='Events', value='bar')
])
async def setting(self, interaction: discord.Interaction, select: ui.Select):
if select.values[0] == 'bar':
await interaction.response.edit_message(view=EventsSetup())
elif select.values[0] == 'foo':
await interaction.response.edit_message(content='LGTM')
class EventsSetup(Setup):
@ui.select(cls=ui.RoleSelect, placeholder='Select roles lol')
async def select_roles(self, interaction: discord.Interaction, select: ui.RoleSelect):
self.select_roles.default_values = select.values
await interaction.response.edit_message(content='imagine bugs', view=self)
class Welcome(ui.View):
@ui.button(label='Set up me lol')
async def foo(self, interaction: discord.Interaction, _):
await interaction.response.send_message(content='Please setup me lol', view=Setup())
print('\n'*100)
discord.http.Route.BASE = 'https://discord.com/api/v7'
await _ctx.send(view=Welcome()) |
Description
My bot received a message update event containing resolved data of a role which had its permissions sent as a number, rather than a
string
as documented. This is obviously breaking behavior and should be looked into.Formatted payload (removed all IDs except the one of Dank Memer):
Steps to Reproduce
N/A
Expected Behavior
The
permissions
field is sent as a string, as documentedCurrent Behavior
The
permissions
field was sent as a numberScreenshots/Videos
No response
Client and System Information
API v10 (https://github.com/disgoorg/disgo)
The text was updated successfully, but these errors were encountered: