#I want to send a Message through an interaction in a certain channel but dont know how

1 messages · Page 1 of 1 (latest)

narrow haven
#

you already got the channel object, so use applicationschannel.send

wary oracle
narrow haven
#

can you show what you ran?

wary oracle
#
        applicationschannel = interaction.guild.get_channel(1021410863766319175)  # applicationschannel id
        await interaction.response.send_message("message has been sent", ephemeral=True)  # command response
        applicationschannel.send  # send embed

last line

#

or what do you mean?

narrow haven
#

...as in, you know how you normally use ctx.send or channel.send?

narrow haven
#

you'd do await ctx.send("...")

wary oracle
#

ah yes but i dont know to use it in interaction

narrow haven
#

you can ignore the interaction, you already responded to it

wary oracle
#

oh

narrow haven
#

the point is that ctx.send is actually ctx.message.channel.send; it's always a channel that you use

#

so all you need is a channel object

#

hence you need await applicationschannel.send(...)

wary oracle
#

I guess I understand

#

works now, thanks for the explanation

narrow haven
#

allgood

wary oracle
narrow haven
#

go on

wary oracle
#

how do i do that the button still works after i restarted the bot?

pulsar ledgeBOT
#

Here's the persistent example.

wary oracle
#

i think i have all conditions