explaination to all trigger

This commit is contained in:
Lou 2025-11-20 19:01:28 +01:00
parent fe3fd9b1b6
commit 9142e440d5
6 changed files with 32 additions and 8 deletions

View file

@ -1,10 +1,11 @@
import Detector from "./Detector.js";
import { cleanMessageContent } from "../utils/strings.js";
//check the regex for "quoi"
// trigger if it's at the end of the sentence (tu fais quoi)
// trigger if it's followed by 1 to 3 words (c'est quoi ça)
// skip if in the middle of a long sentence (je sais pas quoi faire demain)
/*check the regex for "quoi"
trigger if it's at the end of the sentence (tu fais quoi)
trigger if it's followed by 1 to 3 words (c'est quoi ça)
skip if in the middle of a long sentence (je sais pas quoi faire demain)
*/
const answers = [
...Array(10).fill('feur'),

View file

@ -1,6 +1,9 @@
import Detector from "./Detector.js";
import { cleanMessageContent } from "../utils/strings.js";
/*check if someone reply to a "quoi" with a "quoicoubeh" or "coubeh"
send roasts
*/
const answers = [
'Motif de ban ça',
"Non mais t'es pas bien toi ?",

View file

@ -1,6 +1,10 @@
import Detector from "./Detector.js";
import { cleanMessageContent } from "../utils/strings.js";
/*check if someone reply to a "quoi" with a "feur" or "quoifeur"
send praise
*/
const answers = [
"Toi t'es un bon",
"ça j'aime, ça",
@ -8,7 +12,10 @@ const answers = [
"aller !",
'https://tenor.com/fr/view/deez-ha-got-heem-got-em-got-him-gif-4824899',
'https://tenor.com/fr/view/kaamelott-joueur-voil%C3%A0-faites-plaisir-gif-18227872',
'https://tenor.com/view/kaamelott-yvain-exp%C3%A9ience-champion-cest-lexp%C3%A9rience-qui-parle-gif-17313437'
'https://tenor.com/view/kaamelott-yvain-exp%C3%A9ience-champion-cest-lexp%C3%A9rience-qui-parle-gif-17313437',
'https://tenor.com/fr/view/caprio-oh-well-gif-25938306',
'https://tenor.com/fr/view/pro-move-ted-lasso-nicely-done-compliment-jason-sudeikis-gif-17283104469342346529',
'https://tenor.com/fr/view/well-played-sir-gif-22047381'
];
export default class FeurDetector extends Detector {

View file

@ -1,6 +1,8 @@
import Detector from "./Detector.js";
import { cleanMessageContent } from "../utils/strings.js";
//check if the bot is pinged by someone
const answers = [
'Oui ? (stiti)',
"On m'a appelé ?",

View file

@ -2,6 +2,16 @@ import Detector from "./Detector.js";
import compromise from 'fr-compromise';
import { cleanMessageContent } from "../utils/strings.js";
/*if the beginning of the sentence (before trigger) is less than 7 words then drop
otherwise copy the sentence and adjust
exemple : on mange quoi ce midi ? on mange feur ce midi
does not conjugate
cut to "ça" or "ca" if used
exemple : c'est quoi ce truc ? c'est feur ce truc
*/
const suffixes = [
', mon gars',
', mec',

View file

@ -4,6 +4,10 @@ import conj from 'conjugation-fr';
import { toInfinitive } from "../data.js"; // check path ??
import { cleanMessageContent } from "../utils/strings.js";
/*check the pronoun / subject of the question to answer properly by conjugating
exemple : tu fais quoi ? je fais feur
*/
const suffixes = [
', mon gars',
', mec',
@ -13,9 +17,6 @@ const suffixes = [
''
];
// check the pronoun of the question to answer properly
// exemple : tu fais quoi ? je fais feur
export default class withPronounDetector extends Detector {
async createSpecificReply(message) {
const reference = await message.fetchReference().catch(() => null);