Skip to content
Extraits de code Groupes Projets
Valider 49007390 rédigé par Adrien NUNES's avatar Adrien NUNES
Parcourir les fichiers

random sentences

parent c39c03cf
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -5,15 +5,28 @@ class InformeMoi{ ...@@ -5,15 +5,28 @@ class InformeMoi{
constructor(client){ constructor(client){
this.client = client; this.client = client;
this.channels = this.client.channels.cache; this.channels = this.client.channels.cache;
this.sources = ['QAnon', 'IImondE', 'Réinfo Covid', 'FranceSoir', 'Madiavenir', 'LesMoutonsRebelles', 'une amie qui travaille au gouvernement', 'un poste Facebook', 'un twittos', 'Kim Glow', 'l\'AFP' ];
this.sentences= [
'<actor> <want> <action> pour <reason> !',
'Selon <source>, <actor> <want> <action> afin de <reason>.',
'Grâce à <source>, je sais que <actor> <want> <action> pour <reason>.',
'On dit que <actor> <want> <action>, tout ça pour <reason>...',
'<actor> <want> <action> afin de <reason>, ça fait réfléchir...',
'Vous verrez que <actor> va <action> pour <reason>, vous l\'aurez lu ici en premier...',
'🚨ALERTE INFO🚨 :\n <actor> <want> <action> pour <reason> \n (Source : <source>)',
'<actor> <want> <action> rien que pour <reason>.....'
];
} }
getRandomComplot(){ getRandomComplot(){
const actor = complotDB.getRandomActor(); const actor = complotDB.getRandomActor();
const action = complotDB.getRandomAction(); const action = complotDB.getRandomAction();
const reason = complotDB.getRandomReason(); const reason = complotDB.getRandomReason();
const source = this.sources[Math.floor(Math.random()*this.sources.length)];
const want = actor.startsWith("Les ") ? "veulent" : "veut";
const sentence = this.sentences[Math.floor(Math.random()*this.sentences.length)];
const vouloir = actor.startsWith("Les ") ? "veulent" : "veut"; return sentence.replace('<actor>', actor).replace('<want>', want).replace('<reason>', reason).replace('<source>', source).replace('<action>', action);
return `${actor} ${vouloir} ${action} pour ${reason} !`;
} }
parse(message){ parse(message){
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter