Fix error in verify related to NAFF 2.0 migration
This commit is contained in:
parent
b251486dff
commit
4229526c15
1 changed files with 5 additions and 5 deletions
|
@ -63,11 +63,11 @@ class VerifyCog(Extension):
|
||||||
while not verified:
|
while not verified:
|
||||||
response = await self.bot.wait_for_component(
|
response = await self.bot.wait_for_component(
|
||||||
messages=message,
|
messages=message,
|
||||||
check=lambda x: ctx.author.id == x.context.author.id,
|
check=lambda x: ctx.author.id == x.ctx.author.id,
|
||||||
timeout=30,
|
timeout=30,
|
||||||
)
|
)
|
||||||
|
|
||||||
correct = response.context.custom_id.split("||")[-1] == "yes"
|
correct = response.ctx.custom_id.split("||")[-1] == "yes"
|
||||||
if correct:
|
if correct:
|
||||||
for row in components:
|
for row in components:
|
||||||
for component in row.components:
|
for component in row.components:
|
||||||
|
@ -86,14 +86,14 @@ class VerifyCog(Extension):
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
self.logger.warning("Unverified role deleted before verification finished")
|
self.logger.warning("Unverified role deleted before verification finished")
|
||||||
|
|
||||||
await response.context.edit_origin(
|
await response.ctx.edit_origin(
|
||||||
content=f"Welcome, {ctx.author.mention}. Please enjoy your stay.",
|
content=f"Welcome, {ctx.author.mention}. Please enjoy your stay.",
|
||||||
components=components,
|
components=components,
|
||||||
)
|
)
|
||||||
await response.context.message.delete(delay=5)
|
await response.ctx.message.delete(delay=5)
|
||||||
self.logger.debug(f"User {ctx.author.id} verified successfully")
|
self.logger.debug(f"User {ctx.author.id} verified successfully")
|
||||||
else:
|
else:
|
||||||
await response.context.edit_origin(
|
await response.ctx.edit_origin(
|
||||||
content=(f"{ctx.author.mention}, incorrect. " "Please press the button that says `YES`")
|
content=(f"{ctx.author.mention}, incorrect. " "Please press the button that says `YES`")
|
||||||
)
|
)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
|
|
Loading…
Add table
Reference in a new issue