|
1 | 1 | .. image:: https://cdn.discordapp.com/attachments/852872100073963532/854711446767796286/discord.py-message-components.png
|
2 |
| - :target: https://pypi.org/project/discord.py-message-components |
3 |
| - :alt: Name of the project |
| 2 | + :target: https://pypi.org/project/discord.py-message-components |
| 3 | + :alt: Name of the project |
4 | 4 |
|
5 | 5 | .. image:: https://discord.com/api/guilds/852871920411475968/embed.png
|
6 | 6 | :target: https://discord.gg/sb69muSqsg
|
|
18 | 18 | :target: https://pepy.tech/project/discord.py-message-components
|
19 | 19 | :alt: Total downloads for the project
|
20 | 20 |
|
| 21 | +.. image:: https://readthedocs.org/projects/discordpy-message-components/badge/?version=latest |
| 22 | + :target: https://discordpy-message-components.readthedocs.io/en/latest/ |
| 23 | + :alt: Documentation Status |
| 24 | + |
21 | 25 | The Original `discord.py <https://pypi.org/project/discord.py>`_ Library made by `Rapptz <https://github.com/Rapptz>`_ with implementation of the `Discord-Message-Components <https://discord.com/developers/docs/interactions/message-components>`_ by `mccoderpy <https://github.com/mccoderpy/>`_
|
22 | 26 |
|
| 27 | +**Documentation:** `read the docs <https://discordpy-message-components.readthedocs.io/en/latest/>`_ |
| 28 | + |
23 | 29 | Questions, Bugs or Ideas
|
24 | 30 | ________________________
|
25 | 31 |
|
26 | 32 | Open a Issue/Pull request on `GitHub <https://github.com/mccoderpy/discord.py-message-components/pulls>`_, join the `support-Server <https://discord.gg/sb69muSqsg>`_ or send me a direct-message on `Discord <https://discord.com/channels/@me>`_: ``mccuber04#2960``
|
27 | 33 |
|
| 34 | + |
28 | 35 | Installing
|
29 | 36 | __________
|
30 | 37 |
|
@@ -87,8 +94,8 @@ A Command that sends you a Message and edit it when you click a Button:
|
87 | 94 | an_embed = discord.Embed(title='Here are some Button\'s', description='Choose an option', color=discord.Color.random())
|
88 | 95 | msg = await ctx.send(embed=an_embed, components=components)
|
89 | 96 |
|
90 |
| - def _check(i: discord.Interaction, b: discord.ButtonClik): |
91 |
| - return i.message == msg and i.author == ctx.author |
| 97 | + def _check(i: discord.Interaction, b: discord.ButtonClick): |
| 98 | + return i.message == msg and i.member == ctx.author |
92 | 99 |
|
93 | 100 | interaction, button = await client.wait_for('button_click', check=_check)
|
94 | 101 | button_id = button.custom_id
|
@@ -195,7 +202,7 @@ Another (complex) Example where a small Embed will be send; you can move a small
|
195 | 202 |
|
196 | 203 |
|
197 | 204 | @client.event
|
198 |
| - async def on_raw_button_click(interaction: discord.Interaction): |
| 205 | + async def on_raw_interaction_create(interaction: discord.Interaction): |
199 | 206 | await interaction.defer()
|
200 | 207 | pointer: Pointer = get_pointer(interaction.guild)
|
201 | 208 | if not (message := interaction.message):
|
@@ -235,4 +242,4 @@ Another (complex) Example where a small Embed will be send; you can move a small
|
235 | 242 | discord.ActionRow(arrow_button().set_label('←').set_custom_id('left').disable_if(pointer.possition_x <= 0),
|
236 | 243 | arrow_button().set_label('↓').set_custom_id('down'),
|
237 | 244 | arrow_button().set_label('→').set_custom_id('right'))]
|
238 |
| - ) |
| 245 | + ) |
0 commit comments