#Sending a message to another channel

1 messages · Page 1 of 1 (latest)

normal nymph
#

Hi! There is a code that has a drop-down list. If you choose an option, he responds in response to that message with another message. How do I make it so that he sends a message to another channel when choosing an option?

await inter.response.send_message(embed=emb, ephemeral=True)
sleek baneBOT
#

You must get or fetch the channel directly and then call the appropriate method. Example:

# If Bot.get_channel returns None because the channel is not in the Bot's cache,  
# make an API call to fetch the channel  
channel = bot.get_channel(12324234183172) or await bot.fetch_channel(12324234183172)  
  
await channel.send("hello")  

topaz anvil
#

The answer in Disnake RU