77import asyncio
88import os
99
10- from database import *
10+ from database import checar_saldo , alterar_saldo
11+
1112from utils .isGestor import verificar_gestor
1213from command .dev import shutdown , restart
1314from command .roleplay import abraco , invocar , beijar
14- from command .infos import userinfo
15- from caramelo .blacklist .blacklist import blacklist_add , save_blacklist , blacklist_remove
15+ from command .infos import userinfo , botinfo
16+ from caramelo .blacklist .blacklist import blacklist_add , save_blacklist , blacklist_data , blacklist_remove
1617from caramelo .caramelo import lock
1718
19+
1820TOSCO_MODE = False
1921
22+
2023load_dotenv ()
2124
2225TOKEN = os .getenv ("TOKEN" )
26+ CARGO_GESTOR = os .getenv ("CARGO_GESTOR" )
2327
2428intents = discord .Intents .default ()
2529intents .members = True
2630
31+
2732bot = commands .Bot (command_prefix = '+' , intents = intents )
2833
2934textos = (
30- "🌙| Olá Eu sou a Lua Bot !"
35+ "🌙| Olá Eu Sou a LuaBot !"
3136)
3237
3338@bot .event
@@ -42,32 +47,39 @@ async def on_ready():
4247 )
4348 )
4449
45- blacklist_cache = save_blacklist ()
50+
51+ blacklist_cache = save_blacklist ()
52+
53+ # Registra o comando manualmente na árvore
4654
47- # Comandos de Dev
55+ # Comandos de Development :D
4856 bot .tree .add_command (shutdown .shutdown )
4957 bot .tree .add_command (restart .restart )
5058
51- # Comandos de Roleplay(esqueci de colocar o comando /abracar)
59+ # Comandos de Roleplay
5260 bot .tree .add_command (abraco .abracar )
5361 bot .tree .add_command (invocar .invocar )
5462 bot .tree .add_command (beijar .beijar )
5563
5664 # Comandos de Infos
5765 bot .tree .add_command (userinfo .userinfo )
58-
66+ bot .tree .add_command (botinfo .botinfo )
67+
5968 # Comandos do Caramelo Automod/Mod
6069 bot .tree .add_command (lock ) # Comando de Trancar o Canal
61- bot .tree .add_command (blacklist_add )
62- bot .tree .add_command (blacklist_remove )
63-
70+ bot .tree .add_command (blacklist_add ) # comando de adicionar um usuário na blacklist
71+ bot .tree .add_command (blacklist_remove ) # Comando de Remover um usuário da blacklist!
72+
73+
6474 try :
6575 synced = await bot .tree .sync ()
6676 print (f"Sincronizados { len (synced )} comandos.." )
6777 except Exception as e :
6878 print (f"Erro ao sincronizar comandos: { e } " )
6979 print (f'Bot conectado como { bot .user } ' )
7080
81+
82+
7183@bot .tree .command (name = "ping" , description = "Veja o ping do bot" )
7284async def ping (interaction : discord .Interaction ):
7385 latency = round (bot .latency * 1000 )
@@ -209,13 +221,21 @@ async def on_message(message):
209221
210222
211223 if random .randint (1 , 100 ) <= 50 :
212- emoji_tosco = "<:PhoenixUe:1032040147706990644> "
224+ emoji_tosco = "🙌 "
213225
214226
215227 await message .add_reaction (emoji_tosco )
216228
217229 await bot .process_commands (message )
218230
231+ @bot .tree .command (name = "gerenciar_produtos" , description = "[Administração] Gerencie os Produtos da Lojinha da LuaBot!" )
232+ async def gerenciar (interaction : discord .Interaction ):
233+
234+ if not verificar_gestor (interaction .user ):
235+ return await interaction .response .send_message ("💻 Você não tem permissão pra gerenciar minha loja!" , ephemeral = True )
236+ await interaction .response .send_message ("Funcionando!" )
237+
238+
219239@bot .tree .command (name = "ban" , description = "Joga o martelo em alguém que quebrou as regras :D" )
220240async def ban (interaction : discord .Interaction , user : discord .Member , reason : str = "Sem motivo especificado" ):
221241 # Verifica se quem usou o comando pode banir
0 commit comments