Answers for "channel hide command in discord.py"

0

channel hide command in discord.py

#hide channel
@bot.command(help=" Use this command to hide a channel")
@commands.has_permissions(manage_channels=True)
async def hide(ctx):
    await ctx.channel.set_permissions(ctx.guild.default_role,view_channel=False)
    await ctx.send('**<:vf:947194381172084767>This channel is hidden from everyone**')
    await ctx.channel.purge(limit=2)
Posted by: Guest on March-05-2022
0

channel unhiding command in discord.py

#unhide channel
@bot.command(help=" Use this command to unhide a channel")
@commands.has_permissions(manage_channels=True)
async def unhide(ctx):
    await ctx.channel.set_permissions(ctx.guild.default_role,view_channel=True)
    await ctx.send('**<:vf:947194381172084767>This channel is visible to everyone**')
    await ctx.channel.purge(limit=2)
Posted by: Guest on March-05-2022

Code answers related to "channel hide command in discord.py"

Python Answers by Framework

Browse Popular Code Answers by Language