MCPcopy Create free account
hub / github.com/Xchristech2/Zenitsu-Bot / dareCommand

Function dareCommand

commands/dare.js:3–21  ·  view source on GitHub ↗
(sock, chatId, message)

Source from the content-addressed store, hash-verified

1const fetch = require('node-fetch');
2
3async function dareCommand(sock, chatId, message) {
4 try {
5 const shizokeys = 'shizo';
6 const res = await fetch(`https://shizoapi.onrender.com/api/texts/dare?apikey=${shizokeys}`);
7
8 if (!res.ok) {
9 throw await res.text();
10 }
11
12 const json = await res.json();
13 const dareMessage = json.result;
14
15 // Send the dare message
16 await sock.sendMessage(chatId, { text: dareMessage }, { quoted: message });
17 } catch (error) {
18 console.error('Error in dare command:', error);
19 await sock.sendMessage(chatId, { text: '❌ Failed to get dare. Please try again later!' }, { quoted: message });
20 }
21}
22
23module.exports = { dareCommand };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected