Must await the edit.

This commit is contained in:
2023-07-29 19:16:59 -04:00
parent 6ae722beb9
commit ee2aaba421
+2 -2
View File
@@ -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(