-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathanime.js
214 lines (180 loc) · 7.12 KB
/
anime.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
const axios = require("axios");
const {zokou} = require("../framework/zokou");
const traduire = require("../framework/traduction");
const {Sticker ,StickerTypes}= require('wa-sticker-formatter');
zokou({
nomCom: "ranime",
categorie: "Fun",
reaction: "📺"
},
async (origineMessage, zk, commandeOptions) => {
const { repondre, ms } = commandeOptions;
const jsonURL = "https://api.jikan.moe/v4/random/anime"; // Remplacez par votre URL JSON
try {
const response = await axios.get(jsonURL);
const data = response.data.data;
const title = data.title;
const synopsis = data.synopsis;
const imageUrl = data.images.jpg.image_url; // Utilisez l'URL de l'image JPG
const episodes = data.episodes;
const status = data.status;
//const texttraduit = await traduire(synopsis,{ to: 'fr' })
const message = `📺 Titre: ${title}\n🎬 Épisodes: ${episodes}\n📡 Statut: ${status}\n📝 Synopsis: ${synopsis}\n🔗 URL: ${data.url}`;
// Envoyer l'image et les informations
zk.sendMessage(origineMessage, { image: { url: imageUrl }, caption: message }, { quoted: ms });
} catch (error) {
console.error('Error retrieving data from JSON :', error);
repondre('Error retrieving data from JSON.');
}
});
zokou({
nomCom: "google",
categorie: "Search"
}, async (dest, zk, commandeOptions) => {
const { arg, repondre } = commandeOptions;
if (!arg[0] || arg === "") {
repondre("Give me a query.\n*Example: .google What is a bot.*");
return;
}
const google = require('google-it');
try {
const results = await google({ query: arg.join(" ") });
let msg = `Google search for : ${arg}\n\n`;
for (let result of results) {
msg += `➣ Title : ${result.title}\n`;
msg += `➣ Description : ${result.snippet}\n`;
msg += `➣ Link : ${result.link}\n\n────────────────────────\n\n`;
}
// const trdmsg = await traduire(msg,{to : 'fr'})
repondre(msg);
} catch (error) {
repondre("An error occurred during Google search.");
}
});
zokou({
nomCom: "imdb",
categorie: "Search"
}, async (dest, zk, commandeOptions) => {
const { arg, repondre , ms } = commandeOptions;
if (!arg[0] || arg === "") {
repondre("give the name of a series or film.");
return;
}
try {
const response = await axios.get(`http://www.omdbapi.com/?apikey=742b2d09&t=${arg}&plot=full`);
const imdbData = response.data;
let imdbInfo = "⚍⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚍\n";
imdbInfo += " ``` 𝕀𝕄𝔻𝔹 𝕊𝔼𝔸ℝℂℍ```\n";
imdbInfo += "⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎⚎\n";
imdbInfo += "🎬Title : " + imdbData.Title + "\n";
imdbInfo += "📅year : " + imdbData.Year + "\n";
imdbInfo += "⭐Assessment : " + imdbData.Rated + "\n";
imdbInfo += "📆Release : " + imdbData.Released + "\n";
imdbInfo += "⏳Runtime : " + imdbData.Runtime + "\n";
imdbInfo += "🌀Genre : " + imdbData.Genre + "\n";
imdbInfo += "👨🏻💻Director : " + imdbData.Director + "\n";
imdbInfo += "✍writers : " + imdbData.Writer + "\n";
imdbInfo += "👨actors : " + imdbData.Actors + "\n";
imdbInfo += "📃Synopsis : " + imdbData.Plot + "\n";
imdbInfo += "🌐Language : " + imdbData.Language + "\n";
imdbInfo += "🌍Contry : " + imdbData.Country + "\n";
imdbInfo += "🎖️Awards : " + imdbData.Awards + "\n";
imdbInfo += "📦BoxOffice : " + imdbData.BoxOffice + "\n";
imdbInfo += "🏙️Production : " + imdbData.Production + "\n";
imdbInfo += "🌟score : " + imdbData.imdbRating + "\n";
imdbInfo += "❎imdbVotes : " + imdbData.imdbVotes + "";
zk.sendMessage(dest, {
image: {
url: imdbData.Poster,
},
caption: imdbInfo,
}, {
quoted: ms,
});
} catch (error) {
repondre("An error occurred while searching IMDb.");
}
});
zokou({
nomCom: "movie",
categorie: "Search"
}, async (dest, zk, commandeOptions) => {
const { arg, repondre , ms } = commandeOptions;
if (!arg[0] || arg === "") {
repondre("give the name of a series or film.");
return;
}
try {
const response = await axios.get(`http://www.omdbapi.com/?apikey=742b2d09&t=${arg}&plot=full`);
const imdbData = response.data;
let imdbInfo = "Tap on the link to join movie channel on telegram and download movies there : https://t.me/ibrahimtechai\n";
imdbInfo += " ``` BMW MD FILMS```\n";
imdbInfo += "*Made by Ibrahim Adams*\n";
imdbInfo += "🎬Title : " + imdbData.Title + "\n";
imdbInfo += "📅year : " + imdbData.Year + "\n";
imdbInfo += "⭐Assessment : " + imdbData.Rated + "\n";
imdbInfo += "📆Release : " + imdbData.Released + "\n";
imdbInfo += "⏳Runtime : " + imdbData.Runtime + "\n";
imdbInfo += "🌀Genre : " + imdbData.Genre + "\n";
imdbInfo += "👨🏻💻Director : " + imdbData.Director + "\n";
imdbInfo += "✍writers : " + imdbData.Writer + "\n";
imdbInfo += "👨actors : " + imdbData.Actors + "\n";
imdbInfo += "📃Synopsis : " + imdbData.Plot + "\n";
imdbInfo += "🌐Language : " + imdbData.Language + "\n";
imdbInfo += "🌍Contry : " + imdbData.Country + "\n";
imdbInfo += "🎖️Awards : " + imdbData.Awards + "\n";
imdbInfo += "📦BoxOffice : " + imdbData.BoxOffice + "\n";
imdbInfo += "🏙️Production : " + imdbData.Production + "\n";
imdbInfo += "🌟score : " + imdbData.imdbRating + "\n";
imdbInfo += "❎imdbVotes : " + imdbData.imdbVotes + "";
zk.sendMessage(dest, {
image: {
url: imdbData.Poster,
},
caption: imdbInfo,
}, {
quoted: ms,
});
} catch (error) {
repondre("An error occurred while searching IMDb.");
}
});
zokou({
nomCom: "emomix",
categorie: "Conversion"
}, async (dest, zk, commandeOptions) => {
const { arg, repondre,ms , nomAuteurMessage } = commandeOptions;
if (!arg[0] || arg.length !== 1) {
repondre("Incorrect use. Example: .emojimix 😀;🥰");
return;
}
// Divisez la chaîne en deux emojis en utilisant le point-virgule comme séparateur
const emojis = arg.join(' ').split(';');
if (emojis.length !== 2) {
repondre("Please specify two emojis using a ';' as a separator.");
return;
}
const emoji1 = emojis[0].trim();
const emoji2 = emojis[1].trim();
try {
const axios = require('axios');
const response = await axios.get(`https://levanter.onrender.com/emix?q=${emoji1}${emoji2}`);
if (response.data.status === true) {
// Si la requête a réussi, envoyez l'image résultante
let stickerMess = new Sticker(response.data.result, {
pack: nomAuteurMessage,
type: StickerTypes.CROPPED,
categories: ["🤩", "🎉"],
id: "12345",
quality: 70,
background: "transparent",
});
const stickerBuffer2 = await stickerMess.toBuffer();
zk.sendMessage(dest, { sticker: stickerBuffer2 }, { quoted: ms });
} else {
repondre("Unable to create emoji mix.");
}
} catch (error) {
repondre("An error occurred while creating the emoji mix." + error );
}
});