#my bot works but after it for ex. clears few messages it shows the red error application didnt respo

1 messages · Page 1 of 1 (latest)

craggy parrot
#

Thats because you're likely not making it do anything to respond to the command. A simple await ctx.respond('success') should fix that.

bronze salmon
#

^^ @formal swift

bronze salmon
#

hmm

#

what error?

#

show the error

neat sequoia
#

send_message, not send

bronze salmon
#

do

#

yes

#

look at the errors my guy 💀

#

is it working now @formal swift ?

bronze salmon
#

so basically

#

make the send_message a variable first

#

which means

#

msg = await interaction.response.send_message(...)

#

after button is selected, in the callback write this:

#

msg.delete()

#

simple

bronze salmon
#

show the code

#

atleast define it first my guy lmao

#

oh okay, you've done it this way

#

I haven't really used buttons, but there must be a way to delete the original message using the parameter button or interaction

#

try self.delete() @formal swift

#

hmm

#

wait

#

interaction.delete()

#

try that?

#

@formal swift

#

if not that, try interaction.response.delete()

#

none of them work?

#

oh

#

show the code of your whole csv thing

#

hmm okay

#

I'm sorry, but I don't think I'll be able to help in this @formal swift

#

I tried as much, but I don't have much knowledge regarding buttons.

neat sequoia
#

if you have the message object as a variable already, use message.reply(...) or ctx.send(..., reference=message)
if not, you should either get the message by ID (channel.fetch_message, bot.get_message) and use reply or create a partialmessage (channel.get_partial_message) and reply.

neat sequoia
#

respond is a response to an interaction

#

send should be used to reply to a specific message of your choice