В сообщении Discord py
@bot.event
async def on_message(message):
if message.content == "pong":
await message.channel.send('ping')
Funny Falcon
@bot.event
async def on_message(message):
if message.content == "pong":
await message.channel.send('ping')
channel.guild
# Returns a list of all channels from all guilds( as channel IDs )
bot.get_all_channels()