Skip to content

Commit

Permalink
add nulis3 and optimise
Browse files Browse the repository at this point in the history
  • Loading branch information
Kry9toN committed Jan 23, 2021
1 parent bf280dc commit 706a5aa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/command/nulis2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { getBuffer } = require('../utils/functions')
module.exports = {
name: 'nulis2',
aliases: ['n2'],
description: 'Untuk menuliskan di buku bot\nPenggunaan !nulis _tulisan_',
description: 'Untuk menuliskan di buku bot\nPenggunaan !nulis2 _tulisan_',
execute (client, chat, pesan, args) {
const value = args.slice().join(' ')
getBuffer(`https://api.zeks.xyz/api/nulis?text=${value}&apikey=administrator`)
Expand Down
19 changes: 19 additions & 0 deletions src/command/nulis3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export {}
const { MessageType } = require('@adiwajshing/baileys')
const { getBuffer } = require('../utils/functions')
const { fetchJson } = require('../utils/fetcher')

module.exports = {
name: 'nulis3',
aliases: ['n3'],
description: 'Untuk menuliskan di buku bot\nPenggunaan !nulis3 _tulisan_',
execute (client, chat, pesan, args) {
const value = args.slice().join(' ')
fetchJson(`https://tools.zone-xsec.com/api/nulis.php?q=${value}`)
.then(async (hasil) => {
client.reply(pesan.tunggu)
const image = await getBuffer(hasil.image)
client.sendMessage(client.from, image, MessageType.image, { quoted: chat, caption: pesan.berhasil })
}).catch((err) => console.log(err))
}
}
1 change: 0 additions & 1 deletion src/utils/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export {}
let Spin = require('spinnies')
const moment = require('moment-timezone')
const axios = require('axios')
const cfonts = require('cfonts')

const spinner = {
interval: 120,
Expand Down

0 comments on commit 706a5aa

Please sign in to comment.