@@ -145,7 +145,7 @@ def __init__(self, *args, **kwargs):
145
145
146
146
async def _respond (self , * args , ** kwargs ) -> Message :
147
147
message = await self ._get_super ("reply" )(* args , ** kwargs )
148
- if self ._original_response_message == None :
148
+ if self ._original_response_message is None :
149
149
self ._original_response_message = message
150
150
return message
151
151
@@ -155,6 +155,21 @@ async def _defer(self, *args, **kwargs) -> None:
155
155
async def _edit (self , * args , ** kwargs ) -> Message :
156
156
return await self ._original_response_message .edit (* args , ** kwargs )
157
157
158
+ async def delete (self , * , delay : Optional [float ] = None , reason : Optional [str ] = None ) -> None :
159
+ """|coro|
160
+
161
+ Deletes the original response message, if it exists.
162
+
163
+ Parameters
164
+ -----------
165
+ delay: Optional[:class:`float`]
166
+ If provided, the number of seconds to wait before deleting the message.
167
+ reason: Optional[:class:`str`]
168
+ The reason for deleting the message. Shows up on the audit log.
169
+ """
170
+ if self ._original_response_message :
171
+ await self ._original_response_message .delete (delay = delay , reason = reason )
172
+
158
173
159
174
if TYPE_CHECKING :
160
175
# This is a workaround for mypy not being able to resolve the type of BridgeCommand.
0 commit comments