Coder Social home page Coder Social logo

Comments (5)

MCausc78 avatar MCausc78 commented on July 21, 2024

are you sure that you're using api v10? permissions_new doesn't exist on >v7

from discord-api-docs.

sebm253 avatar sebm253 commented on July 21, 2024

are you sure that you're using api v10? permissions_new doesn't exist on >v7

I'm using https://github.com/disgoorg/disgo which is running on API v10, yes

from discord-api-docs.

MCausc78 avatar MCausc78 commented on July 21, 2024

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

from discord-api-docs.

sebm253 avatar sebm253 commented on July 21, 2024

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)

from discord-api-docs.

MCausc78 avatar MCausc78 commented on July 21, 2024

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())

from discord-api-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.