Ajout fonctionnalité des commandes Discord

This commit is contained in:
skylanix
2025-08-18 02:08:01 +02:00
parent c84438af83
commit b8ef1e10f8
14 changed files with 155 additions and 23 deletions

View File

@@ -1,6 +1,55 @@
{% extends "template.html" %}
{% block content %}
<h1>Configuration des Commandes.</h1>
<p>TODO</p>
<h1>Commandes de Mamie</h1>
<p>Gérez les commandes personnalisées du bot. Ces commandes peuvent être activées sur Discord et/ou Twitch selon vos besoins.</p>
<table>
<thead>
<tr>
<th class="table_td">Commande</th>
<th class="table_td">Réponse</th>
<th class="table_td">Discord</th>
<th class="table_td">Twitch</th>
<th class="table_td">Actions</th>
</tr>
</thead>
<tbody>
{% for commande in commandes %}
<tr>
<td class="table_td">{{ commande.trigger }}</td>
<td class="table_td">{{ commande.response }}</td>
<td class="table_td">
<a href="{{ url_for('toggle_discord_commande', commande_id = commande.id) }}" style="text-decoration: none; font-size: 1.2em;">
{{ '✅' if commande.discord_enable else '❌' }}
</a>
</td>
<td class="table_td">
<a href="{{ url_for('toggle_twitch_commande', commande_id = commande.id) }}" style="text-decoration: none; font-size: 1.2em;">
{{ '✅' if commande.twitch_enable else '❌' }}
</a>
</td>
<td class="table_td">
<a href="{{ url_for('delete_commande', commande_id = commande.id) }}" onclick="return confirm('Êtes-vous sûr de vouloir supprimer cette commande ?')">Supprimer</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<h2>Ajouter une commande</h2>
<form action="{{ url_for('add_commande') }}" method="POST">
<label for="trigger">Commande</label>
<input name="trigger" type="text" />
<label for="response">Réponse</label>
<textarea name="response" rows="5" cols="50"></textarea>
<div>
<label for="discord_enable">Discord</label>
<input name="discord_enable" type="checkbox" checked />
</div>
<div>
<label for="twitch_enable">Twitch</label>
<input name="twitch_enable" type="checkbox" unchecked />
</div>
<input type="Submit" value="Ajouter">
</form>
{% endblock %}

View File

@@ -1,7 +1,8 @@
{% extends "template.html" %}
{% block content %}
<h1>Configuration de Mamie.</h1>
<h1>Configuration de Mamie</h1>
<p>Configurez les tokens Discord, les notifications Humble Bundle et l'API ProtonDB pour la commande !protondb.</p>
<h2>Humble Bundle</h2>
<form action="{{ url_for('updateConfiguration') }}" method="POST">

View File

@@ -1,19 +1,20 @@
{% extends "template.html" %}
{% block content %}
<h1>Humeurs de Mamie.</h1>
<h1>Humeurs de Mamie</h1>
<p>Définissez les statuts Discord qui changeront automatiquement toutes les 10 minutes pour donner de la personnalité à votre bot.</p>
<table>
<thead>
<tr>
<th>Text</th>
<th>Action</th>
<th class="table_td">Text</th>
<th class="table_td">Action</th>
</tr>
</thead>
<tbody>
{% for humeur in humeurs %}
<tr>
<td>{{humeur.text}}</td>
<td><a href="{{ url_for('delHumeur', id = humeur.id) }}">Supprimer</a></td>
<td class="table_td">{{humeur.text}}</td>
<td class="table_td"><a href="{{ url_for('delHumeur', id = humeur.id) }}" onclick="return confirm('Êtes-vous sûr de vouloir supprimer cette humeur ?')">Supprimer</a></td>
</tr>
{% endfor %}
</tbody>

View File

@@ -1,6 +1,6 @@
{% extends "template.html" %}
{% block content %}
<h1>Configuration des Messages.</h1>
<h1>Messages de Mamie</h1>
<p>TODO</p>
{% endblock %}

View File

@@ -1,6 +1,6 @@
{% extends "template.html" %}
{% block content %}
<h1>Modération.</h1>
<p>TODO</p>
<h1>Modération</h1>
<p>Outils de modération communautaire pour gérer votre serveur Discord (fonctionnalité en développement).</p>
{% endblock %}