-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚙ Rewrite configuration #54
base: beta
Are you sure you want to change the base?
Conversation
la syntaxe pour ajouter un vérificateur : # le développeur de plugin peut aussi ajouter les champs en tant que variable
class BanConfiguration(Configuration):
friendly_ban = ConfigurationField(bool) # on pourra définir le type, avoir une conversion des données, mettre une valeur par défaut etc à terme
@friendly_ban.check
def friendly_ban(value): # on définie un validateur pour la valeur indiquée
# le vérificateur pourra par exemple être un regex pour le token de bot, et autres choses du même genre
# il n'y aura pas besoin de vérifier le type, puisque ça serait fait automatiquement
if value is True:
return False je précise juste que ce n'est pas obligatoire d'utiliser cette syntaxe, il est tout à fait possible de faire par ex dans le cas d'un regex, il sera possible de faire : si une validation échoue, il y aura un warning dans la console et on pourra récupérer un booléen pour vérifier si c'est bon ou non |
69d9f60
to
557fd97
Compare
557fd97
to
58e378e
Compare
a32d391
to
59e3c34
Compare
J'ai rebasé cette PR sur une version plus récente de beta et ai changé la branche cible. |
59e3c34
to
e7874cd
Compare
* feat(modlogs): add user badge logs * refract(lint): fix relative imports * feat(welcome): add `delete_welcome_on_quick_leave` * fix(action): CodeQL triggers declaration * feat(modlogs): show topic emoji in ticket creation * feat(welcome): add more message variables * fix(config): code using old table * fix(modlogs): missing ID in member roles * fix(modlogs): invite detection info * fix(antiscam): linter * fix(stats): antiscam enabled count * feat(config): basic autocompletion * refract(doc): sort server config options * fix(rank): undefined style for card * feat(info): add avatar command * refract(lint): remove unusued imports * feat(rss): better move feed selector * refract(emojis): cleanup unicode fetching * feat(config): emojis list autocomplete * fix(errors): autocompletion issues * refract(lint): better _() typing * feat(config): add enums and bools translations * feat(config): improve autocompletion * fix(logs): invite detection log * refract(bayes): slightly better var name * feat(antiscam): better training results * fix(tr): "finnish" translation in french * fix(about): privacy policy url * fix(stats): ignore kick action log search * refract(ttt): player start random generator * fix(url): http urls * feat(config): levelup channel translation * feat(xp): better error when closed DMs * feat(doc): v4.3.2 * fix(antiscam): indentation replace * refract(xp): db access methods * fix(antiscam): better short-message filter * feat(stats): add role reactions internal stats * feat(slash): rank command conversion * refract(lint): small improvement * fix(config): timeout on config set cmd * refract(translator): better missing tr handle * fix(info): server with incorrect channels count * feat(xp): new card generator * feat(xp): better card generation * fix(modlogs): role deletion logs * refract(lint): serverconfig.py * fix(antiscam): command invocation * feat(tr): new guild features translations * feat(xp): paginate top command * feat(error): new RangeError message * feat(doc): update top cmd doc * feat(slash): migrate top command * fix(mc): skin with invalid username * feat(xp): new card generator * feat(logs): add server update logs * New Crowdin updates (#52) * Update source file en.json * Update source file en.json * Update source file en.json * New translations en.json (LOLCAT) * New translations en.json (LOLCAT) * New translations en.json (LOLCAT) * New translations en.json (LOLCAT) * New translations en.json (LOLCAT) * Update source file en.json * Update source file en.json * Update source file en.json * Update source file en.json * Update source file en.json * New translations en.json (LOLCAT) * New translations en.json (LOLCAT) * New translations en.json (LOLCAT) * New translations en.json (LOLCAT) * New translations en.json (LOLCAT)
change configuration backend of the ban plugin to the new one
9dc0513
to
4a3f093
Compare
Cette PR a pour but d'écrire un nouveau système de configuration pour être à la fois plus simple pour débuter et plus puissant avec une utilisation avancée.
Il est possible de voir la documentation concernant cette mise à jour à l'adresse suivante : https://gipsy.docs.gunivers.net/en/feat-config-ascpial/create_plugin/03-Global_configuration_variables.html