PycordViews 1.2.14__tar.gz → 1.2.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pycordviews-1.2.14 → pycordviews-1.2.16}/PKG-INFO +1 -1
- {pycordviews-1.2.14 → pycordviews-1.2.16}/PycordViews.egg-info/PKG-INFO +1 -1
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/kit/confirm.py +1 -1
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/kit/poll.py +2 -2
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/pagination/pagination_view.py +1 -1
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/views/easy_modified_view.py +3 -3
- {pycordviews-1.2.14 → pycordviews-1.2.16}/setup.py +1 -1
- {pycordviews-1.2.14 → pycordviews-1.2.16}/LICENSE +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/PycordViews.egg-info/SOURCES.txt +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/PycordViews.egg-info/dependency_links.txt +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/PycordViews.egg-info/requires.txt +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/PycordViews.egg-info/top_level.txt +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/README.md +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/__init__.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/kit/__init__.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/menu/__init__.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/menu/errors.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/menu/menu.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/menu/selectMenu.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/modal/__init__.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/modal/easy_modal_view.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/modal/errors.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/multibot/__init__.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/multibot/bot.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/multibot/errors.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/multibot/multibot.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/multibot/process.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/pagination/__init__.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/pagination/errors.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/pagination/page.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/views/__init__.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pycordViews/views/errors.py +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/pyproject.toml +0 -0
- {pycordviews-1.2.14 → pycordviews-1.2.16}/setup.cfg +0 -0
@@ -23,7 +23,7 @@ class Confirm:
|
|
23
23
|
|
24
24
|
self.__future: Future = get_event_loop().create_future()
|
25
25
|
|
26
|
-
async def _confirm(self, button: Button, interaction: Interaction):
|
26
|
+
async def _confirm(self, button: Button, interaction: Interaction, data):
|
27
27
|
"""
|
28
28
|
Base asynchronous _confirm function called when button is pressed
|
29
29
|
"""
|
@@ -100,7 +100,7 @@ class Poll:
|
|
100
100
|
if _callable is not None:
|
101
101
|
self.__view.set_callable(self.__button_no.custom_id, _callable=_callable)
|
102
102
|
|
103
|
-
async def yes(self, button, interaction):
|
103
|
+
async def yes(self, button, interaction, data):
|
104
104
|
"""
|
105
105
|
Base asynchronous function when "yes" button is pressed.
|
106
106
|
Increment “yes_count” attribute when pressed and respond with an ephemeral message.
|
@@ -113,7 +113,7 @@ class Poll:
|
|
113
113
|
self.__clicked_members.append(interaction.user.id)
|
114
114
|
await interaction.response.send_message(f"You have selected : {button.label}", ephemeral=True)
|
115
115
|
|
116
|
-
async def no(self, button, interaction):
|
116
|
+
async def no(self, button, interaction, data):
|
117
117
|
"""
|
118
118
|
Base asynchronous function when "no" button is pressed.
|
119
119
|
Increment “yes_count” attribute when pressed and respond with an ephemeral message.
|
@@ -60,7 +60,7 @@ class Pagination:
|
|
60
60
|
self.__view.get_ui('counter').label = f"{self.__current_page+1}/{len(self.__pages)}"
|
61
61
|
return self
|
62
62
|
|
63
|
-
async def __turn_page(self, button, interaction: Interaction):
|
63
|
+
async def __turn_page(self, button, interaction: Interaction, data):
|
64
64
|
"""
|
65
65
|
Turn the page when button is pressed
|
66
66
|
"""
|
@@ -69,7 +69,7 @@ class EasyModifiedViews(View):
|
|
69
69
|
if type(ui).__name__ in ('SelectMenu', 'Pagination', 'Confirm', 'Poll', 'EasyModifiedViews'):
|
70
70
|
for item in ui.get_view.items:
|
71
71
|
self.add_items(item)
|
72
|
-
self.set_callable(item.custom_id, _callable=ui.get_callable(item.custom_id), data=
|
72
|
+
self.set_callable(item.custom_id, _callable=ui.get_callable(item.custom_id), data=ui.get_callable_data(item.custom_id))
|
73
73
|
|
74
74
|
else:
|
75
75
|
self.__callback[ui.custom_id] = {'ui': ui, 'func': None, 'data': {}}
|
@@ -133,12 +133,12 @@ class EasyModifiedViews(View):
|
|
133
133
|
|
134
134
|
view = EasyModifiedViews(None)
|
135
135
|
|
136
|
-
view.add_view(discord.ui.Button(label='coucou', custom_id='test_ID'
|
136
|
+
view.add_view(discord.ui.Button(label='coucou', custom_id='test_ID'))
|
137
137
|
|
138
138
|
async def rep(**UI**, **interaction**, data: dict[str, Any]):
|
139
139
|
await interaction.response.send_message(data['message'])
|
140
140
|
|
141
|
-
view.set_callable(custom_id='test_ID', callable=rep)
|
141
|
+
view.set_callable(custom_id='test_ID', callable=rep, data={'message': 'Hello !'})
|
142
142
|
await ctx.respond('coucou', view=view)
|
143
143
|
"""
|
144
144
|
for custom_id in custom_ids:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|