File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,6 +141,5 @@ async def _create_support_ticket(
141141 ],
142142 )
143143
144- new_ticket_info_embed = NewTicketInfoEmbed
145- await new_ticket_info_embed .send (ctx_or_interaction , channel , ticket_number )
144+ await NewTicketInfoEmbed .send (ctx_or_interaction , channel , ticket_number )
146145 return True
Original file line number Diff line number Diff line change @@ -147,20 +147,23 @@ async def send_embed(
147147
148148 # Dispatch the embed message based on context type.
149149 if channel :
150- kwargs = {"embed" : embed , "view" : view }
150+ kwargs = {"embed" : embed }
151+ if view is not None :
152+ kwargs ["view" ] = view
151153 if file :
152154 kwargs ["file" ] = file
153155 return await channel .send (** kwargs )
154156
155- kwargs = {"embed" : embed , "view" : view , "ephemeral" : ephemeral }
157+ kwargs = {"embed" : embed , "ephemeral" : ephemeral }
158+ if view is not None :
159+ kwargs ["view" ] = view
156160 if file :
157161 kwargs ["file" ] = file
158162
159163 if isinstance (ctx_or_interaction , commands .Context ):
160164 return await ctx_or_interaction .send (** kwargs )
161165
162- if not ctx_or_interaction . response . is_done () :
166+ try :
163167 await ctx_or_interaction .response .send_message (** kwargs )
164- return await ctx_or_interaction .original_response ()
165- else :
166- return await ctx_or_interaction .followup .send (** kwargs )
168+ except Exception as e :
169+ return await ctx_or_interaction .followup .send (** kwargs )
You can’t perform that action at this time.
0 commit comments