Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Discord #py #channel #ID
ADD COMMENT
Topic
Name
7+3 =