mirror of
https://github.com/skylanix/MamieHenriette.git
synced 2026-02-06 14:50:34 +01:00
127 lines
5.6 KiB
HTML
127 lines
5.6 KiB
HTML
{% extends "template.html" %}
|
|
|
|
{% block content %}
|
|
<h1>Configuration de Mamie</h1>
|
|
<p>Configurez les tokens Discord, les notifications Humble Bundle et l'API Twitch.</p>
|
|
|
|
<h2>Discord</h2>
|
|
<form action="{{ url_for('updateConfiguration') }}" method="POST">
|
|
<fieldset>
|
|
<legend>API Discord</legend>
|
|
<label for="discord_token">Token Discord (caché)</label>
|
|
<input name="discord_token" type="password" placeholder="Votre token Discord" />
|
|
<small>Nécessite un redémarrage après modification</small>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>Messages de bienvenue</legend>
|
|
<label for="welcome_enable">
|
|
<input type="checkbox" name="welcome_enable" {% if configuration.getValue('welcome_enable') %}checked="checked"{% endif %}>
|
|
Activer le message de bienvenue pour les nouveaux membres
|
|
</label>
|
|
|
|
<label for="welcome_channel_id">Canal de bienvenue</label>
|
|
<select name="welcome_channel_id">
|
|
{% for channel in channels %}
|
|
<option value="{{channel.id}}" {% if configuration.getIntValue('welcome_channel_id')==channel.id %}selected="selected"{% endif %}>
|
|
{{channel.name}}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
|
|
<label for="welcome_message">Message personnalisé de bienvenue</label>
|
|
<textarea name="welcome_message" rows="3" placeholder="Bienvenue sur le serveur !">{{ configuration.getValue('welcome_message') }}</textarea>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>Messages de départ</legend>
|
|
<label for="leave_enable">
|
|
<input type="checkbox" name="leave_enable" {% if configuration.getValue('leave_enable') %}checked="checked"{% endif %}>
|
|
Activer le message de départ quand un membre quitte le serveur
|
|
</label>
|
|
|
|
<label for="leave_channel_id">Canal de départ</label>
|
|
<select name="leave_channel_id">
|
|
{% for channel in channels %}
|
|
<option value="{{channel.id}}" {% if configuration.getIntValue('leave_channel_id')==channel.id %}selected="selected"{% endif %}>
|
|
{{channel.name}}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
|
|
<label for="leave_message">Message personnalisé de départ</label>
|
|
<textarea name="leave_message" rows="3" placeholder="Un membre a quitté le serveur.">{{ configuration.getValue('leave_message') }}</textarea>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>Modération</legend>
|
|
<label for="moderation_enable">
|
|
<input type="checkbox" name="moderation_enable" {% if configuration.getValue('moderation_enable') %}checked="checked"{% endif %}>
|
|
Activer les commandes d'avertissement (!averto, !delaverto, !listaverto)
|
|
</label>
|
|
|
|
<label for="moderation_ban_enable">
|
|
<input type="checkbox" name="moderation_ban_enable" {% if configuration.getValue('moderation_ban_enable') %}checked="checked"{% endif %}>
|
|
Activer les commandes de bannissement (!ban, !unban)
|
|
</label>
|
|
|
|
<label for="moderation_kick_enable">
|
|
<input type="checkbox" name="moderation_kick_enable" {% if configuration.getValue('moderation_kick_enable') %}checked="checked"{% endif %}>
|
|
Activer la commande d'expulsion (!kick)
|
|
</label>
|
|
|
|
<label for="moderation_staff_role_id">ID du rôle Staff</label>
|
|
<input name="moderation_staff_role_id" type="text" value="{{ configuration.getValue('moderation_staff_role_id') }}" placeholder="581990740431732738" />
|
|
|
|
<label for="moderation_embed_delete_delay">Délai de suppression des embeds (en secondes)</label>
|
|
<input name="moderation_embed_delete_delay" type="number" value="{{ configuration.getValue('moderation_embed_delete_delay') or '0' }}" placeholder="0" min="0" />
|
|
<small>Mettre 0 pour ne pas supprimer automatiquement</small>
|
|
</fieldset>
|
|
|
|
<input type="Submit" value="Enregistrer la configuration Discord">
|
|
</form>
|
|
|
|
<h2>API Twitch</h2>
|
|
<form action="{{ url_for('updateConfiguration') }}" method="POST">
|
|
<label for="twitch_client_id">Client ID</label>
|
|
<input name="twitch_client_id" type="text" value="{{ configuration.getValue('twitch_client_id') }}" />
|
|
<label for="twitch_client_secret">Client Secret</label>
|
|
<input name="twitch_client_secret" type="text" value="{{ configuration.getValue('twitch_client_secret') }}" />
|
|
<label for="twitch_channel">Chaîne à rejoindre</label>
|
|
<input name="twitch_channel" type="text" value="{{ configuration.getValue('twitch_channel') }}"
|
|
placeholder="#machinTruc" />
|
|
<input type="Submit" value="Définir">
|
|
<p>
|
|
<a href="{{ url_for('twitchConfigurationHelp') }}">Aide</a>
|
|
</p>
|
|
{% if configuration.getValue('twitch_client_secret') and configuration.getValue('twitch_client_id') %}
|
|
<p>
|
|
<a href="{{ url_for('twitchRequestToken') }}">Obtenir token et refresh token</a>
|
|
</p>
|
|
<label for="twitch_access_token">Access Token</label>
|
|
<input name="twitch_access_token" type="text" value="{{ configuration.getValue('twitch_access_token') }}"
|
|
readonly="readonly" />
|
|
<label for="twitch_refresh_token">Refresh Token</label>
|
|
<input name="twitch_refresh_token" type="text" value="{{ configuration.getValue('twitch_refresh_token') }}"
|
|
readonly="readonly" />
|
|
<p>Nécessite un redémarrage après l'obtention des Tokens.</p>
|
|
{% endif %}
|
|
</form>
|
|
|
|
<h2>Humble Bundle</h2>
|
|
<form action="{{ url_for('updateConfiguration') }}" method="POST">
|
|
<label for="humble_bundle_enable">Activer</label>
|
|
<input type="checkbox" name="humble_bundle_enable" {% if configuration.getValue('humble_bundle_enable') %}
|
|
checked="checked" {% endif %}>
|
|
<label>Activer les notifications Humble Bundle</label>
|
|
<label for="humble_bundle_channel">Canal de notification des packs Humble Bundle</label>
|
|
<select name="humble_bundle_channel">
|
|
{% for channel in channels %}
|
|
<option value="{{channel.id}}" {% if configuration.getIntValue('humble_bundle_channel')==channel.id %}
|
|
selected="selected" {% endif %}>
|
|
{{channel.name}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<input type="Submit" value="Définir">
|
|
</form>
|
|
{% endblock %} |