Skip to content

Commit 737416d

Browse files
authored
Add coinflip command and Minecraft skin viewer
1 parent 385ed78 commit 737416d

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

main.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,28 @@ async def minerar(interaction: discord.Interaction):
125125

126126
await interaction.response.send_message(embed=embed)
127127

128+
@bot.tree.command(name="coinflip", description="Faça um Cara ou Coroa no Discord!")
129+
async def coinflip(interaction: discord.Interaction):
130+
caraoucoroa = ["Cara", "Coroa"]
131+
132+
resultado = random.choices(caraoucoroa)
133+
134+
await interaction.response.send_message(f"🪙 {resultado}!")
135+
136+
bot.tree.command(name="minecraft_skin", description="Veja a skin de um jogador de Minecraft")
137+
@app_commands.describe(player="O nome (nickname) do jogador")
138+
async def skin(interaction: discord.Interaction, player: str):
139+
# Render "body" mostra o corpo inteiro do personagem
140+
skin_url = f"https://crafatar.com/renders/body/{player}?overlay"
141+
142+
143+
embed = discord.Embed(
144+
title=f"Skin de {player}",
145+
color=discord.Color.blue()
146+
)
147+
embed.set_image(url=skin_url)
148+
embed.set_footer(text="API fornecida por Crafatar")
149+
150+
await interaction.response.send_message(embed=embed)
151+
128152
bot.run(TOKEN)

0 commit comments

Comments
 (0)