mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-21 16:03:10 +00:00
Remove automatic defer behaviour from View and Modal
This doesn't make as much sense anymore now that InteractionResponse.edit_message exists.
This commit is contained in:
@@ -192,8 +192,6 @@ class Modal(View):
|
|||||||
return
|
return
|
||||||
|
|
||||||
await self.on_submit(interaction)
|
await self.on_submit(interaction)
|
||||||
if not interaction.response._responded:
|
|
||||||
await interaction.response.defer()
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return await self.on_error(e, interaction)
|
return await self.on_error(e, interaction)
|
||||||
else:
|
else:
|
||||||
|
@@ -366,8 +366,6 @@ class View:
|
|||||||
return
|
return
|
||||||
|
|
||||||
await item.callback(interaction)
|
await item.callback(interaction)
|
||||||
if not interaction.response._responded:
|
|
||||||
await interaction.response.defer()
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return await self.on_error(e, item, interaction)
|
return await self.on_error(e, item, interaction)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user