Answers for "discord py get channel name"

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
Posted by: Guest on May-31-2021
0

discord.py find voice channel by name

channel = discord.utils.find(lambda c: c.name == 'some name' and c.type == 'voice', some_list_of_channels)
if channel is not None:
    print(channel.id)
Posted by: Guest on January-22-2020
0

discord.py get channel id by channel name

channel = discord.utils.get(server.channels, name="Channel_name_here", type="ChannelType.voice")
Posted by: Guest on June-07-2020
0

discord.py get channel id by channel name

channel_names = ['channel1', 'channel2', 'channel3']
for ch in channel_names:
    channel = discord.get.utils(server.channels, name=ch, type="ChannelType.voice")
    full(channel)
Posted by: Guest on June-07-2020

Code answers related to "discord py get channel name"

Python Answers by Framework

Browse Popular Code Answers by Language