Discord.py - Allow command in specific channel

i need to use my discord command in specific channel , I'm using @client.command() I mean if i used my command in another channel will be not working

@client.command()
async def w(ctx):
    channel = client.get_channel(775491463940669480)

    await ctx.send("hello) ```

 

Solution 1:

You can check if ctx.channel is equal to your specific channel.

@client.command()
async def w(ctx):
    if ctx.channel.id == 775491463940669480:
        await ctx.send("hello)