new detectors and reactions
This commit is contained in:
parent
73b906fd9b
commit
fe3fd9b1b6
11 changed files with 266 additions and 10 deletions
|
|
@ -16,13 +16,10 @@ export function createTriggersChecklist() {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Base class for all detectors
|
||||
* Using a Chain of Responsibility pattern
|
||||
*/
|
||||
// Base class for all detectors, using a Chain of Responsibility pattern
|
||||
export default class Detector {
|
||||
nextDetector = null;
|
||||
triggerName = 'quoi'; // Valeur par défaut
|
||||
triggerName = 'quoi'; // default value
|
||||
|
||||
/**
|
||||
* @param nextDetector The detector that will be checked if this one doesn't detect anything
|
||||
|
|
@ -56,7 +53,7 @@ export default class Detector {
|
|||
|
||||
const forcedRoleId = getSetting(message.guildId, 'forcedAnswerRoleId');
|
||||
|
||||
// Si l'utilisateur a le rôle forcé, on ignore le pourcentage (100%)
|
||||
// if user has a forced role, skip the percentage (100%)
|
||||
const threshold = (forcedRoleId != null && message.member?.roles.cache.has(forcedRoleId))
|
||||
? 100
|
||||
: this.getChanceToReply(message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue