Must await the edit.
This commit is contained in:
@@ -62,8 +62,8 @@ class UsernameRequest(nextcord.ui.View):
|
|||||||
async def approve(self, button: nextcord.ui.Button, interaction: nextcord.Interaction):
|
async def approve(self, button: nextcord.ui.Button, interaction: nextcord.Interaction):
|
||||||
user = interaction.guild.get_member(self.user_id)
|
user = interaction.guild.get_member(self.user_id)
|
||||||
if user is not None:
|
if user is not None:
|
||||||
user.edit(nick=self.new_nickname)
|
await user.edit(nick=self.new_nickname)
|
||||||
content = interaction.message.content + f" Approved by <@{interaction.user.id}.>"
|
content = interaction.message.content + f" Approved by <@{interaction.user.id}>."
|
||||||
await interaction.response.edit_message(content=content, view=None)
|
await interaction.response.edit_message(content=content, view=None)
|
||||||
else:
|
else:
|
||||||
await interaction.response.edit_message(
|
await interaction.response.edit_message(
|
||||||
|
|||||||
Reference in New Issue
Block a user