You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Description: Get a summary and information about a topic from Wikipedia.\n\n"+
7
+
"Example: wiki OpenAI";
8
+
api.sendMessage(usage,event.threadID);
9
+
returnPromise.resolve();
10
+
}
11
+
12
+
constdata=event.body.split(' ');
13
+
if(data.length<2){
14
+
api.sendMessage('Invalid Use Of Command!\nUsage: Wiki <word>',event.threadID);
15
+
}else{
16
+
try{
17
+
data.shift();
18
+
lettxtWiki='';
19
+
constres=awaitgetWiki(data.join(' '));
20
+
if(res===undefined||res.title===undefined){
21
+
thrownewError(`API RETURNED THIS: ${res}`);
22
+
}
23
+
txtWiki+=`🔎 You searched for the word '${res.title}' \n\n TimeStamp: ${res.timestamp}\n\n Description: ${res.description}\n\n Info: ${res.extract}\n\nSource: https://en.wikipedia.org`;
0 commit comments