[英]How do i make my discord.py bot react to all images sent in a channel
[英]How do I make my discord bot get all text channel id's in all servers?
我基本上希望机器人获取所有服务器中所有文本频道的频道 ID。 我已经找了几个小时,但我似乎找不到任何东西。 我猜它看起来像这样:
for server in bot.guilds:
for channel in server.channels(Channeltype=text)
print(channel.id)
discord.Guild
有一个名为text_channels
的属性。
for guild in bot.guilds:
for text_ch in guild.text_channels:
print(text_ch.id)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.