D
D
DmitrNy ---2019-12-09 18:44:36
Python
DmitrNy ---, 2019-12-09 18:44:36

How to get a list of channels on the server through discord.py?

There is a discord bot connected to several servers. We need a script to pull the names of all the channels of the server, knowing its ID and having a bot connected to it. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lightmanLP, 2019-12-10
@lightmanLP

Have you come for a job? Why do you need hands? What about the documentation?

A
Adam Salavatov, 2020-01-11
@darkvessel

for channel in <client>.get_guild(ID сервера).channels:
    print(channel.id)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question