how to check what channel a command is being called from discord.py code example
Example 1: on message discord py
@bot.event
async def on_message(message):
if message.content == "pong":
await message.channel.send('ping')
Example 2: discord py fetch channel by id
channel = discord.utils.get(ctx.guild.channels, name=given_name)
channel_id = channel.id