Skip to content

Commit 1aa5946

Browse files
committed
commit for the GOAT SUPREME
1 parent fa07f59 commit 1aa5946

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1162
-9
lines changed
0 Bytes
Binary file not shown.
25.2 KB
Binary file not shown.

app/_app.py

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import boutique as shop
1616
import inventaire as card
1717
import bvn as bvn
18+
import work as wk
1819

1920

2021
@bot.event
@@ -543,14 +544,16 @@ async def boutic_carte(interaction: discord.Interaction):
543544
async def show_invent(interaction: discord.Interaction):
544545
await card.afficher_cartes_inventaire(interaction)
545546
logger.info(f"{interaction.user} a ouvert son inventaire")
546-
547+
548+
547549
@bot.event
548550
async def on_member_join(member: discord.Member):
549551
# Générer l'image
550552
image_path = bvn.generate_welcome_image(member)
551553

552554
# Trouver le salon où envoyer le message
553-
channel = discord.utils.get(member.guild.text_channels, name="🤖・commandes-bots")
555+
channel = discord.utils.get(
556+
member.guild.text_channels, name="🤖・commandes-bots")
554557
if channel is None:
555558
logger.warning("Salon 🤖・commandes-bots introuvable")
556559
return
@@ -559,11 +562,39 @@ async def on_member_join(member: discord.Member):
559562
file = discord.File(image_path, filename="welcome.png")
560563

561564
# Créer l'embed avec l'image en attachment
562-
embed = discord.Embed(title=f"Bienvenue {member.display_name} !", color=conf.EMBED_COLOR_GOLD)
565+
embed = discord.Embed(
566+
title=f"Bienvenue {member.display_name} !", color=conf.EMBED_COLOR_GOLD)
563567
embed.set_image(url="attachment://welcome.png")
564568

565569
# Envoyer le message avec fichier et embed
566570
await channel.send(file=file, embed=embed)
567571

572+
# _______________________________________________________________________________________________________________________________
573+
574+
575+
@tree.command(name="work", description="Publie une offre d'emploi rémunérée")
576+
@app_commands.describe(salaire="Montant de la rémunération")
577+
async def working(interaction: discord.Interaction, salaire: int):
578+
await wk.work(interaction, salaire)
579+
logger.info(f"{interaction.user} a crée un offre d'emploi")
580+
581+
582+
@tree.command(name="validation_work", description="Valider la mission pour paiement")
583+
async def valid(interaction: discord.Interaction):
584+
await wk.validation_work(interaction)
585+
logger.info(f"{interaction.user} a valider son offre d'emploi")
586+
587+
@tree.command(name="contrat", description="Crée un contrat entre 2 membres")
588+
@app_commands.describe(candidat= "Le candidat que l'on choisi pour le contrat")
589+
async def licence(interaction: discord.Interaction, candidat: discord.Member):
590+
await wk.contrat(interaction, candidat)
591+
logger.info(f"{interaction.user} a crée un contrat avec {candidat}")
592+
593+
@tree.command(name="supprimer_offre", description="Supprimer une offre que vous avez créée")
594+
async def supp_offer(interaction: discord.Interaction):
595+
await wk.supprimer_offre(interaction)
596+
logger.info(f"{interaction.user} a supprimé son offre.")
597+
598+
568599

569600
bot.run(TOKEN)

0 commit comments

Comments
 (0)