Facebook
From Chocolate Parakeet, 3 Years ago, written in JavaScript.
This paste is a reply to Konuşan Bot from Furtsy-Laweis-Yiğit - view diff
Embed
Download Paste or View Raw
Hits: 135
  1. client.on('message', msg => {
  2.     if (msg.author.bot) return;
  3.     if (msg.channel.id == "787360233412231208") {
  4.         let encodedsoru = encodeURI(msg)
  5.         get(`https://api.codare.fun/sor/${encodedsoru}`, async function(err, resp, body) {
  6.             body = JSON.parse(body);
  7.             if (err) return msg.channel.send('hata oluştu')
  8.             msg.channel.send(`Soru: ${msg} \nCevap : ${body.cevap}`)
  9.         })
  10.     }
  11. })