Skip to content

Commit 20a89b5

Browse files
authored
Create chartbojs
1 parent 2b2a932 commit 20a89b5

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

zezeplugins/chartbojs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
const { zokou } = require('../framework/zokou');
2+
3+
const isIdeaCommandEnabled = true; // Variable pour activer ou désactiver la commande "idea"
4+
5+
zokou({ nomCom: "chatbot", categorie: "IA", reaction:"👨‍🏫", active: isIdeaCommandEnabled }, async (dest, zk, commandeOptions) => {
6+
const { ms, arg, repondre } = commandeOptions;
7+
const message = arg.join(' ');
8+
9+
// Greetings
10+
const greetings = ["Hello!", "Hi there!", "Greetings!", "Hey!", "Nice to see you!"];
11+
const randomGreeting = greetings[Math.floor(Math.random() * greetings.length)];
12+
13+
// Introduction
14+
const introduction = [
15+
"I'm Assistant, a helpful bot. I'm here to assist you with any questions or tasks you have.",
16+
"Welcome! I'm Assistant, your friendly bot here to help you with anything you need.",
17+
"Hi! I'm Assistant, your personal AI assistant. How can I assist you today?",
18+
"Greetings! I'm Assistant, ready to assist you with your queries and tasks."
19+
];
20+
const randomIntroduction = introduction[Math.floor(Math.random() * introduction.length)];
21+
22+
// Project Suggestions
23+
const projet = [
24+
"You should start a new project related to your passion!",
25+
"How about working on a creative project that excites you?",
26+
"Consider starting a project that aligns with your interests and goals.",
27+
"Why not embark on a project that challenges and inspires you?"
28+
];
29+
const randomProjet = projet[Math.floor(Math.random() * projet.length)];
30+
31+
// Suggestions for "presentement"
32+
const presentement = [
33+
"Currently, you could learn a new skill or hobby.",
34+
"Right now, you might explore new books or movies.",
35+
"At the moment, you could try practicing mindfulness or meditation.",
36+
"Presently, you could focus on improving your physical fitness."
37+
];
38+
const randomPresentement = presentement[Math.floor(Math.random() * presentement.length)];
39+
40+
// Custom response for the "idea" command when it is enabled
41+
const customResponse = `This is a custom response for the 'idea' command when it is enabled.
42+
Réponse générée le ${new Date().toLocaleString()}.`;
43+
44+
// Check if the "idea" command is enabled
45+
if (isIdeaCommandEnabled) {
46+
// Ajouter un délai de 60 secondes pour la réponse
47+
setTimeout(() => {
48+
repondre(customResponse);
49+
}, 60000); // 60 secondes (60000 millisecondes)
50+
} else {
51+
// Envoyer une réponse indiquant que la commande est désactivée
52+
repondre("Désolé, la commande 'idea' est actuellement désactivée.");
53+
return;
54+
}
55+
56+
// Vérifier le contenu du message et générer une réponse en conséquence
57+
if (message.includes('project')) {
58+
repondre(` ${randomGreeting} ${randomProjet} ${randomIntroduction}`);
59+
} else if (message.includes('book')) {
60+
repondre(` ${randomGreeting} How about writing a book on a topic you're knowledgeable about? ${randomIntroduction}`);
61+
} else if (message.includes('trip') || message.includes('travel')) {
62+
repondre(` ${randomGreeting} Plan a trip to a destination you've always wanted to visit! ${randomIntroduction}`);
63+
} else if (message.includes('presentement')) {
64+
repondre(` ${randomGreeting} ${randomPresentement} ${randomIntroduction}`);
65+
} else {
66+
repondre(` ${randomGreeting} I have an idea for you, but I need more information. Could you provide more details? ${randomIntroduction}`);
67+
}
68+
});

0 commit comments

Comments
 (0)