-
Notifications
You must be signed in to change notification settings - Fork 0
/
empresas.py
28 lines (21 loc) · 1.05 KB
/
empresas.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import nextcord
async def create(ctx,name):
GUILD = ctx.guild
ROLE = await GUILD.create_role(name=name)
CT = nextcord.utils.get(ctx.guild.roles, name="ct")
NEECT = nextcord.utils.get(ctx.guild.roles, name="NEECT")
overwrites = {
GUILD.default_role: nextcord.PermissionOverwrite(read_messages=False),
ROLE: nextcord.PermissionOverwrite(read_messages=True),
CT: nextcord.PermissionOverwrite(read_messages=True)
}
overwrites_private= {
GUILD.default_role: nextcord.PermissionOverwrite(read_messages=False),
ROLE: nextcord.PermissionOverwrite(read_messages=True),
NEECT: nextcord.PermissionOverwrite(read_messages=True)
}
category = await GUILD.create_category_channel(name)
await GUILD.create_text_channel(name + "-forum",category = category,overwrites= overwrites)
await GUILD.create_voice_channel(name + "-video",category = category,overwrites= overwrites)
await GUILD.create_voice_channel(name + "-admin",category = category,overwrites= overwrites_private)
await ctx.send("all done")