Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Damego/discord-py-slash-components-bridge

Repository files navigation

discord-py-slash-components-bridge

Bridge for discord-interactions and discord-components

Welcome

discord-interactions and discord-components are incompatible and this bridge can compatible these libs. This lib overrides discord-interaction classes and methods for working with discord-components components(Selects and Buttons)

Installing

pip install --upgrade discord-slash-components-bridge

How to use?

from discord.ext import commands
#from discord_slash import SlashCommand # No need anymore
from discord_slash_components_bridge import SlashCommand

bot = commands.Bot(...)
slash = SlashCommand(bot, ...)

What have been fixed?

Fixed Messageable.fetch_message() returning discord.Message. Now it return ComponentMessage

Migration from discord-components

If you have used this, then I prepared for you some things.
  • Now you no need DiscordComponents(...) in your code.
  • Events button_click and select_option have been saved.
  • Event interaction now is component.
  • Interaction is not available to use. Now it's ComponentContext and now you need use methods of ComponentContext

If you used components of discord-py-interactions

  • Now You can't use components of discord-py-interactions. You will get error.
  • ComponentContext.component now return Component object(like Button or Select) from discord-components
  • with ComponentContext.message.components same thing.

Have some troubles?

Open issue is this repository or dm me in Discord

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages