forked from Ilhamskhyi/botv1-Md
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cuaca.js
33 lines (26 loc) · 1012 Bytes
/
cuaca.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
/**
diupload oleh https://github.com/uhdahlah
**/
let axios = require("axios");
let handler = async(m, { conn, text }) => {
if (!text) return conn.reply(m.chat, 'Masukan Nama Daerah', m)
await m.reply('Searching...')
axios.get(`https://api.xteam.xyz/cuaca?kota=${text}&APIKEY=uhdahlah`).then ((res) => {
let hasil = `Cuaca Daerah *${text}*\n\nTempat : ${res.data.message.kota}\nAngin : ${res.data.message.angin}\nCuaca : ${res.data.message.cuaca}\nDeskripsi : ${res.data.message.deskripsi}\nKelembapan : ${res.data.message.kelembapan}\nSuhu : ${res.data.message.suhu}\nUdara : ${res.data.message.pressure}`
conn.reply(m.chat, hasil, m)
})
}
handler.help = ['cuaca'].map(v => v + ' <daerah>')
handler.tags = ['tools']
handler.command = /^(cuaca)$/i
handler.owner = false
handler.mods = false
handler.premium = false
handler.group = false
handler.private = false
handler.admin = false
handler.botAdmin = false
handler.fail = null
handler.exp = 0
handler.limit = true
module.exports = handler