Ajout de la monétisation V0.1
This commit is contained in:
parent
cd0fc4c488
commit
879355f792
29 changed files with 698 additions and 72 deletions
|
|
@ -9,6 +9,7 @@ try:
|
|||
except ImportError:
|
||||
from backports.zoneinfo import ZoneInfo
|
||||
from typing import Optional, Dict, Any
|
||||
from utils.premium import check_premium_tier
|
||||
|
||||
PARIS_TZ = ZoneInfo("Europe/Paris")
|
||||
DATE_FORMAT = "%d/%m/%Y %H:%M"
|
||||
|
|
@ -259,12 +260,14 @@ class Absence(commands.Cog):
|
|||
self.check_absences.start()
|
||||
|
||||
@commands.slash_command(name="absence", description="Déclarer une absence staff")
|
||||
@check_premium_tier()
|
||||
async def absence(self, interaction: disnake.ApplicationCommandInteraction,
|
||||
superieur: Optional[disnake.Member] = commands.Param(None, description="Le supérieur hiérarchique à prévenir")):
|
||||
"""Déclare une absence via un formulaire"""
|
||||
await interaction.response.send_modal(AbsenceModal(superieur))
|
||||
|
||||
@commands.slash_command(name="absence_config", description="Configurer le système d'absence (Admin)")
|
||||
@check_premium_tier()
|
||||
@commands.has_permissions(administrator=True)
|
||||
async def absence_config(self, interaction: disnake.ApplicationCommandInteraction):
|
||||
"""Ouvre le panneau de configuration des absences"""
|
||||
|
|
@ -350,6 +353,7 @@ class Absence(commands.Cog):
|
|||
print(f"Erreur lors du barrage du message d'absence: {e}")
|
||||
|
||||
@commands.slash_command(name="fin_absence", description="Terminer son absence staff")
|
||||
@check_premium_tier()
|
||||
async def fin_absence(self, interaction: disnake.ApplicationCommandInteraction):
|
||||
"""Met fin à l'absence en cours"""
|
||||
all_abs = await load_absences()
|
||||
|
|
@ -382,6 +386,7 @@ class Absence(commands.Cog):
|
|||
await interaction.response.send_message("✅ Ton absence a été retirée.", ephemeral=True)
|
||||
|
||||
@commands.slash_command(name="liste_absences", description="Afficher la liste des absences staff en cours")
|
||||
@check_premium_tier()
|
||||
async def liste_absences(self, interaction: disnake.ApplicationCommandInteraction):
|
||||
"""Affiche les absences en cours sur le serveur"""
|
||||
all_abs = await load_absences()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue