File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ # 🐕 Caramelo
2+
3+ Um sistema de ** AutoMod/Mod** da LuaBot!
Original file line number Diff line number Diff line change 1+ import discord
2+ from discord .ext import commands
3+
4+
5+
6+ intents = discord .Intents .default ()
7+ intents .members = True
8+
9+ bot = commands .Bot (command_prefix = '+' , intents = intents )
10+
11+
12+
13+ # Comandos de trancar o canal
14+ @bot .tree .command (name = "lock" , description = "[Caramelo Mod] Tranque um Canal do Servidor!" )
15+ async def lock (interaction : discord .Interaction ):
16+
17+ if not interaction .user .guild_permissions .manage_channels :
18+ await interaction .response .send_message ("Você não tem permissão para Gerenciar Canais!" )
19+
20+ if interaction .user .guild_permissions .manage_channels :
21+ everyone = interaction .guild .default_role
22+ channel = interaction .channel
23+
24+ overwrite = channel .overwrites_for (everyone )
25+ overwrite .send_messages = False
26+
27+ await channel .set_permissions (everyone , overwrite = overwrite )
28+
29+ await interaction .response .send_message (f"🔒 Este canal foi trancado por { interaction .user .mention } !" )
30+
31+ # TODO: Fazer o Comando de /unlock
Original file line number Diff line number Diff line change 1212from command .dev import shutdown , restart
1313from command .roleplay import abraco , invocar , beijar
1414from command .infos import userinfo
15+ from caramelo .caramelo import lock
1516
1617TOSCO_MODE = False
1718
@@ -52,6 +53,9 @@ async def on_ready():
5253 # Comandos de Infos
5354 bot .tree .add_command (userinfo .userinfo )
5455
56+ # Comandos do Caramelo Automod/Mod
57+ bot .tree .add_command (lock ) # Comando de Trancar o Canal
58+
5559 try :
5660 synced = await bot .tree .sync ()
5761 print (f"Sincronizados { len (synced )} comandos.." )
You can’t perform that action at this time.
0 commit comments