how to get channel name discord.py code example
Example 1: Discord py get channel ID by name
@bot.command()
async def get_channel(ctx, *, given_name=None):
for channel in ctx.guild.channels:
if channel.name == given_name:
wanted_channel_id = channel.id
await ctx.send(wanted_channel_id) # this is just to check
Example 2: discord.py get channel id by channel name
channel = discord.utils.get(server.channels, name="Channel_name_here", type="ChannelType.voice")