Get channel by id in discord interactions

Viewed 46

I would like to send logs messages in a logs channel, but for that I need the logs channel object.

Because I used discord interactions to define my bot, I can't use the get_channel(id) method. I can't find the method to get a channel by id in the discord-interactions documentation.

Thanks in advance.

bot = interactions.Client(
    token = my_token,
    intents = interactions.Intents.ALL
    )

logs_channel = bot.get_channel(channel_id = 1015371164312424468)
Traceback (most recent call last):
  File "[...]", line 17, in <module>
    logs_channel = bot.get_channel(channel_id = 1015371164312424468)
AttributeError: 'Client' object has no attribute 'get_channel'
0 Answers
Related