-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshutdown.py
More file actions
28 lines (20 loc) · 835 Bytes
/
shutdown.py
File metadata and controls
28 lines (20 loc) · 835 Bytes
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 discord
from discord.ext import commands
import squarecloud as square
from dotenv import load_dotenv
import os
load_dotenv()
SQUARE_TOKEN = os.getenv("SQUARE_API_KEY")
SQUARE_APP_ID = os.getenv("SQUARE_APP_ID")
OWNER_ID = os.getenv("OWNER_ID")
intents = discord.Intents.default()
intents.members = True
bot = commands.Bot(command_prefix='+', intents=intents)
client = square.Client(api_key=SQUARE_TOKEN)
@bot.tree.command(name="shutdown", description="[Dev] Para o processo de execução da LuaBot")
async def shutdown(interaction: discord.Interaction):
if not OWNER_ID:
await interaction.response.send_message("Tá querendo me desligar é? **Você não tem permissão para me desativar!**")
else:
await client.stop_app(SQUARE_APP_ID)
print("Adeus Mundo Cruel")