Skip to content

Commit 9781879

Browse files
authored
Refactor bot commands and presence settings
Updated bot commands and improved presence message.
1 parent d96a176 commit 9781879

1 file changed

Lines changed: 24 additions & 18 deletions

File tree

main.py

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
11
import discord
22
from discord.ext import commands
33
from dotenv import load_dotenv
4-
import os
4+
import os
55

6-
# Carrega as variáveis do arquivo .env
76
load_dotenv()
8-
TOKEN = os.getenv("DISCORD_TOKEN")
7+
8+
TOKEN = os.getenv("TOKEN")
99

1010
intents = discord.Intents.default()
1111
intents.members = True
1212

1313
bot = commands.Bot(command_prefix='+', intents=intents)
1414

15+
textos = (
16+
"🌙| Prefixo: / | Website: theluabot.squareweb.app"
17+
)
18+
1519
@bot.event
1620
async def on_ready():
17-
print(f"Pronto! {bot.user}")
21+
print(f"LuaBot Online! - {bot.user.name} ({bot.user.id})")
1822
await bot.tree.sync()
19-
23+
await bot.change_presence(
24+
activity=discord.CustomActivity(
25+
textos
26+
)
27+
)
2028

2129
@bot.tree.command(name="ping", description="Veja o ping do bot")
2230
async def ping(interaction: discord.Interaction):
23-
latency = round(bot.latency * 1000)
31+
latency = round(bot.latency * 1000)
2432
await interaction.response.send_message(f"AU AU!! \nLatência: {latency}ms")
2533

2634

@@ -34,12 +42,9 @@ async def morder(interaction: discord.Interaction, user: discord.Member):
3442
@bot.tree.command(name="chinelos", description="Lua mostra um chinelo destruído")
3543
async def chinelos(interaction: discord.Interaction):
3644
embed = discord.Embed(title="O Chinelo virou pó!")
37-
embed.set_image(
38-
url="https://i.postimg.cc/fL8khMgX/Opera-Instant-neo-2025-09-16-194923-www-canva-com.png"
39-
)
45+
embed.set_image(url="https://i.postimg.cc/fL8khMgX/Opera-Instant-neo-2025-09-16-194923-www-canva-com.png")
4046
await interaction.response.send_message(embed=embed)
4147

42-
4348
@bot.tree.command(name="carinho", description="Faça carinho na Lua!!")
4449
async def carinho(interaction: discord.Interaction):
4550
await interaction.response.send_message(
@@ -52,13 +57,14 @@ async def latir(interaction: discord.Interaction):
5257
await interaction.response.send_message("AU AU AUUUUUUUUUUUUUUUUUUUUUUUUUUU!")
5358

5459

55-
@bot.event
56-
async def on_member_join(member):
57-
try:
58-
await member.send(
59-
f"AU AU! {member.name} ... AU AU! Quem é você? Espero que não tenha trazido chinelos... :P"
60-
)
61-
except discord.Forbidden:
62-
print(f"Não consegui latir para {member.name} 🥹")
60+
@bot.tree.command(name="brinquedo", description="Lua mostra um brinquedo para você :3")
61+
async def brinquedo(interaction: discord.Interaction):
62+
embed = discord.Embed(title="Aqui ó, um brinquedo pra você!")
63+
embed.set_image(url="https://imgur.com/a/cNUnoSo")
64+
await interaction.response.send_message(embed=embed)
65+
66+
@bot.tree.command(name="ajuda", description="As vezes precisamos de Ajuda :3")
67+
async def ajuda(interaction: discord.Interaction, user: discord.Member):
68+
await interaction.response.send_message("Olá! meu prefixo nesse servidor é "/", :3")
6369

6470
bot.run(TOKEN)

0 commit comments

Comments
 (0)