如何创建频道,并且仅让特定角色查看

时间:2019-07-30 03:13:13

标签: python-3.x discord.py-rewrite

我不知道如何创建频道,仅允许频道创建者和某些角色组查看该频道

我尝试在Google上寻找解决方案,但未找到任何结果。

# Open Ticket Command Start
@client.command()
async def open(ctx):
    guild = ctx.message.guild
    tnum = [random.randint(0, 9) for p in range(0, 5)]
    await guild.create_text_channel(f"ticket-{tnum}")
# Open Ticket Command End

我试图在discord.py rewrite分支中创建一个票务系统,但是我不知道如何创建允许任何用户创建频道的命令,但是只能创建该频道的用户和用户具有特定角色的用户可以在频道中查看和发送消息。

0 个答案:

没有答案