NAFF updated to version 2.1.0
This commit is contained in:
parent
a64f6c6003
commit
f3c6aa9f85
|
@ -351,9 +351,9 @@ class Gatekeep(Extension):
|
|||
),
|
||||
)
|
||||
|
||||
@listen(events.Button)
|
||||
async def on_regenerate_button(self, button: events.Button):
|
||||
ctx = button.context
|
||||
@listen(events.ButtonPressed)
|
||||
async def on_regenerate_button(self, button: events.ButtonPressed):
|
||||
ctx = button.ctx
|
||||
member = ctx.author
|
||||
|
||||
if (
|
||||
|
|
|
@ -308,9 +308,9 @@ class Polls(Extension):
|
|||
poll_entry.channel_id = poll_message.channel.id
|
||||
poll_entry.save()
|
||||
|
||||
@listen(events.Button)
|
||||
async def on_button(self, button: events.Button): #pylint: disable=too-many-branches,too-many-statements
|
||||
ctx = button.context
|
||||
@listen(events.ButtonPressed)
|
||||
async def on_button(self, button: events.ButtonPressed): #pylint: disable=too-many-branches,too-many-statements
|
||||
ctx = button.ctx
|
||||
|
||||
# Ensure that the pressed button is a vote button.
|
||||
if ctx.custom_id.startswith("poll-vote:"):
|
||||
|
|
|
@ -12,7 +12,7 @@ from naff import (
|
|||
Role,
|
||||
Embed,
|
||||
AutocompleteContext,
|
||||
Select,
|
||||
StringSelectMenu,
|
||||
SelectOption,
|
||||
listen,
|
||||
context_menu,
|
||||
|
@ -436,7 +436,7 @@ class SelfRoles(Extension):
|
|||
|
||||
max_vals = 1 if group_q.exclusive else len(options)
|
||||
|
||||
select = Select(
|
||||
select = StringSelectMenu(
|
||||
options=options,
|
||||
placeholder=f"Select roles from the group {group}",
|
||||
custom_id=f"role-group-assign:{group}",
|
||||
|
@ -552,7 +552,7 @@ class SelfRoles(Extension):
|
|||
or msg.embeds[0].title is None
|
||||
or len(msg.components) < 1
|
||||
or len(msg.components[0].components) < 1
|
||||
or not isinstance(msg.components[0].components[0], Select)
|
||||
or not isinstance(msg.components[0].components[0], StringSelectMenu)
|
||||
or not msg.components[0].components[0].custom_id.startswith("role-group-assign")
|
||||
):
|
||||
await ctx.send("Could not identify this as a role-group message!", ephemeral=True)
|
||||
|
@ -600,7 +600,7 @@ class SelfRoles(Extension):
|
|||
|
||||
max_vals = 1 if group_q.exclusive else len(options)
|
||||
|
||||
select = Select(
|
||||
select = StringSelectMenu(
|
||||
options=options,
|
||||
placeholder=f"Select roles from the group {group}",
|
||||
custom_id=f"role-group-assign:{group}",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,7 +10,7 @@ heimdallr = "heimdallr.Heimdallr:main"
|
|||
[tool.poetry.dependencies]
|
||||
python = "^3.10"
|
||||
peewee = "^3.15.1"
|
||||
naff = "^1.11.1"
|
||||
naff = "2.1.0"
|
||||
orjson = "^3.7.8"
|
||||
python-dotenv = "^0.20.0"
|
||||
captcha = "^0.4"
|
||||
|
|
Loading…
Reference in New Issue