From 963ca9df478a18ff0a4a070a826326c1a43e16f3 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sat, 19 Jun 2021 18:28:54 +0700 Subject: [PATCH 01/18] Create mess.json Edit pesan mu disini --- mess.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 mess.json diff --git a/mess.json b/mess.json new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/mess.json @@ -0,0 +1 @@ + From 75bbca0c6f2a4e168e12d6604b6a4d94ef169c66 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 18:54:48 +0700 Subject: [PATCH 02/18] Update mess.json Message For Bot --- mess.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mess.json b/mess.json index 8b13789..16d2659 100644 --- a/mess.json +++ b/mess.json @@ -1 +1,6 @@ - +{ + "hbis": "Waktu Tersisa 10 Detik Lagi!", + "ban": "Kamu Telah Di Banned Oleh Owner Karena Melanggar Peraturan Bot!", + "ser": "Username Kamu Tidak Terdaftar Di Database Bot\n\nSilahkan Daftar Dahulu!\nCukup Ketik /daftar!", + "gc": "Fitur Ini Hanya Dapat Di Akses Di Dalam Grup!" +} From 71b74461c48247138bb4736cdc37349a49b95621 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 19:01:40 +0700 Subject: [PATCH 03/18] Update config.json Adding a Telegram Owner Username that works for Owner Features --- config.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config.json b/config.json index d93ec78..6cfde33 100644 --- a/config.json +++ b/config.json @@ -1,8 +1,9 @@ -{ +{ + "usernameOwner": "BryanRfly", "apikey": "", "bot_token": "", "owner": "LoL Human", "ownerLink": "https://t.me/LoLHumen", "version": "1.1.0", "prefix": "/" -} \ No newline at end of file +} From 216820726f3c3017491fa6699ffbc12af4d64e2b Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 19:03:16 +0700 Subject: [PATCH 04/18] Update Readme.md --- Readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 4b2e5f7..6ee4b09 100644 --- a/Readme.md +++ b/Readme.md @@ -21,7 +21,8 @@ ## Edit config file Edit the required value in `config.json`. You can get the apikey at [`LoL Human Rest API`](http://api.lolhuman.xyz/). And get bot token at [`@BotFather`](http://t.me/BotFather). ```json -{ +{ + "usernameOwner": "BryanRfly", "apikey": "", "bot_token": "", "owner": "LoL Human", @@ -42,4 +43,4 @@ Edit the required value in `config.json`. You can get the apikey at [`LoL Human # Thanks To * [`Telegraf`](https://github.com/telegraf/telegraf) * [`Pais`](https://github.com/Paiiss) -* `Ben` \ No newline at end of file +* `Ben` From e853b05e76ac6d5573386dd061f77d15d2a3e0f8 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 21:30:11 +0700 Subject: [PATCH 05/18] Update config.json --- config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/config.json b/config.json index 6cfde33..af9377b 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,7 @@ { "usernameOwner": "BryanRfly", "apikey": "", + "xkey": "", "bot_token": "", "owner": "LoL Human", "ownerLink": "https://t.me/LoLHumen", From 19c8a52985b2a896947aa377a530d3c662fd7c48 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 21:34:40 +0700 Subject: [PATCH 06/18] Create banned.json banned feature that makes it easy for you to block bot users by using a username --- lib/banned.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 lib/banned.json diff --git a/lib/banned.json b/lib/banned.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/lib/banned.json @@ -0,0 +1 @@ +[] From 2d89e2897c4ca6e531082f10ce3732e76170af14 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 21:37:58 +0700 Subject: [PATCH 07/18] Create user.json register feature, bot users are required to register before using bots --- lib/user.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 lib/user.json diff --git a/lib/user.json b/lib/user.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/lib/user.json @@ -0,0 +1 @@ +[] From dea9cd1a1f06ea559e0912ffb43589b0eaccd483 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 21:51:57 +0700 Subject: [PATCH 08/18] Update help.js --- lib/help.js | 663 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 418 insertions(+), 245 deletions(-) diff --git a/lib/help.js b/lib/help.js index fc53233..860bac2 100644 --- a/lib/help.js +++ b/lib/help.js @@ -1,32 +1,63 @@ const fs = require('fs') +const moment = require('moment-timezone') const config = JSON.parse(fs.readFileSync(`./config.json`)) +const speed = require('performance-now') +const time = moment.tz('Asia/Jakarta').format('DD/MM HH:mm:ss') +const date = new Date().toLocaleDateString() +const wita = moment.tz('Asia/Makassar').format('HH:mm:ss') +const wit = moment.tz('Asia/Jayapura').format('HH:mm:ss') + +const shape = '️꧉' +const d = new Date +const locale = 'id' +const gmt = new Date(0).getTime() - new Date('1 January 2021').getTime() +const weton = ['Pahing', 'Pon','Wage','Kliwon','Legi'][Math.floor(((d * 1) + gmt) / 84600000) % 5] +const hari = d.toLocaleDateString(locale, { weekday: 'long' }) +const datee = d.toLocaleDateString(locale, { + day: 'numeric', + month: 'long', + year: 'numeric' + }) +const ini_hari = `${hari} ${weton}, ${datee}` exports.start = async(lol, name) => { - text = `Hello ${name}! Im a multifunction bot build with ❤️ by [my master](${config.ownerLink}).` + text = `Date: ${ini_hari}\nTime: ${time}\n\nHello ${name}! Im a multifunction bot build with ❤️ by [my master](${config.ownerLink})\n\n type /help to display Menu!.` await lol.replyWithMarkdown(text, { disable_web_page_preview: true }) } exports.help = async(lol, name, user_id) => { - text = `Hello ${name}! Here are the available commands you can use :` + text = `Date: ${ini_hari}\nTime: ${time}\n\nHello ${name}! Here are the available commands you can use:\n\nrequest fitur chat owner @BryanRfly\n\n Semoga Hari Mu Menyean` options = { reply_markup: { inline_keyboard: [ [ - { text: 'Islami ☪️', callback_data: 'islami-' + user_id }, - { text: 'Download 📥', callback_data: 'downloader-' + user_id } + { text: 'Islami ', callback_data: 'islami-' + user_id }, + { text: 'Download ', callback_data: 'downloader-' + user_id } ], [ - { text: 'Text Pro Me 🖊', callback_data: 'textpro-' + user_id }, - { text: 'Photo Oxy 🖊', callback_data: 'phoxy-' + user_id }, - { text: 'Ephoto 360 🖊', callback_data: 'ephoto-' + user_id } + { text: 'Text Pro Me ', callback_data: 'textpro-' + user_id }, + { text: 'Photo Oxy ', callback_data: 'phoxy-' + user_id }, + { text: 'Ephoto 360 ', callback_data: 'ephoto-' + user_id } ], [ - { text: 'Random Image 📷', callback_data: 'randimage-' + user_id }, - { text: 'Random Text 📑', callback_data: 'randtext-' + user_id }, + { text: 'Random Image ', callback_data: 'randimage-' + user_id }, + { text: 'Random Text ', callback_data: 'randtext-' + user_id }, ], [ - { text: 'Anime 🧸', callback_data: 'anime-' + user_id }, - { text: 'Movie & Story 🎥', callback_data: 'movie-' + user_id }, + { text: 'Anime ', callback_data: 'anime-' + user_id }, + { text: 'Movie & Story ', callback_data: 'movie-' + user_id }, + { text: 'Education ', callback_data: 'education-' + user_id }, + ], + [ + { text: 'Game & Fun', callback_data: 'game-' + user_id }, + { text: 'About User', callback_data: 'user-' + user_id }, + ], + [ + { text: 'Owner Only', callback_data: 'owner-' + user_id }, + ], + [ + { text: 'Information', callback_data: 'info-' + user_id }, + { text: 'Group & Admin', callback_data: 'gc-' + user_id }, ], ] } @@ -42,15 +73,15 @@ exports.islami = async(lol, user_id) => { prefix = config.prefix text = `Islami Menu : -❏ ${prefix}listsurah -❏ ${prefix}alquran no_surah -❏ ${prefix}alquran no_surah/no_ayat -❏ ${prefix}alquran no_surah/no_ayat1-no_ayat2 -❏ ${prefix}alquranaudio no_surah -❏ ${prefix}alquranaudio no_surah/no_ayat -❏ ${prefix}asmaulhusna -❏ ${prefix}kisahnabi -❏ ${prefix}jadwalsholat daerah +${shape} ${prefix}listsurah +${shape} ${prefix}alquran no_surah +${shape} ${prefix}alquran no_surah/no_ayat +${shape} ${prefix}alquran no_surah/no_ayat1-no_ayat2 +${shape} ${prefix}alquranaudio no_surah +${shape} ${prefix}alquranaudio no_surah/no_ayat +${shape} ${prefix}asmaulhusna +${shape} ${prefix}kisahnabi +${shape} ${prefix}jadwalsholat daerah ` await lol.editMessageText(text, { reply_markup: { @@ -67,22 +98,23 @@ exports.downloader = async(lol, user_id) => { prefix = config.prefix text = `Downloader Menu : -❏ ${prefix}ytplay query -❏ ${prefix}ytsearch query -❏ ${prefix}ytmp3 link -❏ ${prefix}ytmp4 link -❏ ${prefix}tiktoknowm link -❏ ${prefix}tiktokmusic link -❏ ${prefix}tiktokmusic link -❏ ${prefix}twitterimage link -❏ ${prefix}spotify link -❏ ${prefix}spotifysearch query -❏ ${prefix}jooxplay query -❏ ${prefix}zippyshare link -❏ ${prefix}pinterest query -❏ ${prefix}pinterestdl link -❏ ${prefix}pixiv query -❏ ${prefix}pixivdl pixiv_id +${shape} ${prefix}xnxxdl link +${shape} ${prefix}ytplay query +${shape} ${prefix}ytsearch query +${shape} ${prefix}ytmp3 link +${shape} ${prefix}ytmp4 link +${shape} ${prefix}tiktoknowm link +${shape} ${prefix}tiktokmusic link +${shape} ${prefix}tiktokmusic link +${shape} ${prefix}twitterimage link +${shape} ${prefix}spotify link +${shape} ${prefix}spotifysearch query +${shape} ${prefix}jooxplay query +${shape} ${prefix}zippyshare link +${shape} ${prefix}pinterest query +${shape} ${prefix}pinterestdl link +${shape} ${prefix}pixiv query +${shape} ${prefix}pixivdl pixiv_id ` await lol.editMessageText(text, { reply_markup: { @@ -99,12 +131,12 @@ exports.movie = async(lol, user_id) => { prefix = config.prefix text = `Movie & Story Menu : -❏ ${prefix}drakorongoing -❏ ${prefix}lk21 query -❏ ${prefix}wattpad url_wattpad -❏ ${prefix}wattpadsearch query -❏ ${prefix}cerpen -❏ ${prefix}ceritahoror +${shape} ${prefix}drakorongoing +${shape} ${prefix}lk21 query +${shape} ${prefix}wattpad url_wattpad +${shape} ${prefix}wattpadsearch query +${shape} ${prefix}cerpen +${shape} ${prefix}ceritahoror ` await lol.editMessageText(text, { reply_markup: { @@ -122,14 +154,14 @@ exports.anime = async(lol, user_id) => { prefix = config.prefix text = `Anime Menu : -❏ ${prefix}wait -❏ ${prefix}manga query -❏ ${prefix}anime query -❏ ${prefix}character query -❏ ${prefix}kusonime url_kusonime -❏ ${prefix}kusonimesearch query -❏ ${prefix}otakudesu url_otakudesu -❏ ${prefix}otakudesusearch query +${shape} ${prefix}wait +${shape} ${prefix}manga query +${shape} ${prefix}anime query +${shape} ${prefix}character query +${shape} ${prefix}kusonime url_kusonime +${shape} ${prefix}kusonimesearch query +${shape} ${prefix}otakudesu url_otakudesu +${shape} ${prefix}otakudesusearch query ` await lol.editMessageText(text, { reply_markup: { @@ -146,15 +178,15 @@ exports.randtext = async(lol, user_id) => { prefix = config.prefix text = `Random Text Menu : -❏ ${prefix}quotes -❏ ${prefix}quotesdilan -❏ ${prefix}quotesanime -❏ ${prefix}quotesimage -❏ ${prefix}faktaunik -❏ ${prefix}katabijak -❏ ${prefix}pantun -❏ ${prefix}bucin -❏ ${prefix}randomnama +${shape} ${prefix}quotes +${shape} ${prefix}quotesdilan +${shape} ${prefix}quotesanime +${shape} ${prefix}quotesimage +${shape} ${prefix}faktaunik +${shape} ${prefix}katabijak +${shape} ${prefix}pantun +${shape} ${prefix}bucin +${shape} ${prefix}randomnama ` await lol.editMessageText(text, { reply_markup: { @@ -171,80 +203,80 @@ exports.randimage = async(lol, user_id) => { prefix = config.prefix text = `Radom Image Menu : -❏ ${prefix}art -❏ ${prefix}bts -❏ ${prefix}exo -❏ ${prefix}elf -❏ ${prefix}loli -❏ ${prefix}neko -❏ ${prefix}waifu -❏ ${prefix}shota -❏ ${prefix}husbu -❏ ${prefix}sagiri -❏ ${prefix}shinobu -❏ ${prefix}megumin -❏ ${prefix}wallnime -❏ ${prefix}chiisaihentai -❏ ${prefix}trap -❏ ${prefix}blowjob -❏ ${prefix}yaoi -❏ ${prefix}ecchi -❏ ${prefix}hentai -❏ ${prefix}ahegao -❏ ${prefix}hololewd -❏ ${prefix}sideoppai -❏ ${prefix}animefeets -❏ ${prefix}animebooty -❏ ${prefix}animethighss -❏ ${prefix}hentaiparadise -❏ ${prefix}animearmpits -❏ ${prefix}hentaifemdom -❏ ${prefix}lewdanimegirls -❏ ${prefix}biganimetiddies -❏ ${prefix}animebellybutton -❏ ${prefix}hentai4everyone -❏ ${prefix}bj -❏ ${prefix}ero -❏ ${prefix}cum -❏ ${prefix}feet -❏ ${prefix}yuri -❏ ${prefix}trap -❏ ${prefix}lewd -❏ ${prefix}feed -❏ ${prefix}eron -❏ ${prefix}solo -❏ ${prefix}gasm -❏ ${prefix}poke -❏ ${prefix}anal -❏ ${prefix}holo -❏ ${prefix}tits -❏ ${prefix}kuni -❏ ${prefix}kiss -❏ ${prefix}erok -❏ ${prefix}smug -❏ ${prefix}baka -❏ ${prefix}solog -❏ ${prefix}feetg -❏ ${prefix}lewdk -❏ ${prefix}waifu -❏ ${prefix}pussy -❏ ${prefix}femdom -❏ ${prefix}cuddle -❏ ${prefix}hentai -❏ ${prefix}eroyuri -❏ ${prefix}cum_jpg -❏ ${prefix}blowjob -❏ ${prefix}erofeet -❏ ${prefix}holoero -❏ ${prefix}classic -❏ ${prefix}erokemo -❏ ${prefix}fox_girl -❏ ${prefix}futanari -❏ ${prefix}lewdkemo -❏ ${prefix}wallpaper -❏ ${prefix}pussy_jpg -❏ ${prefix}kemonomimi -❏ ${prefix}nsfw_avatar +${shape} ${prefix}art +${shape} ${prefix}bts +${shape} ${prefix}exo +${shape} ${prefix}elf +${shape} ${prefix}loli +${shape} ${prefix}neko +${shape} ${prefix}waifu +${shape} ${prefix}shota +${shape} ${prefix}husbu +${shape} ${prefix}sagiri +${shape} ${prefix}shinobu +${shape} ${prefix}megumin +${shape} ${prefix}wallnime +${shape} ${prefix}chiisaihentai +${shape} ${prefix}trap +${shape} ${prefix}blowjob +${shape} ${prefix}yaoi +${shape} ${prefix}ecchi +${shape} ${prefix}hentai +${shape} ${prefix}ahegao +${shape} ${prefix}hololewd +${shape} ${prefix}sideoppai +${shape} ${prefix}animefeets +${shape} ${prefix}animebooty +${shape} ${prefix}animethighss +${shape} ${prefix}hentaiparadise +${shape} ${prefix}animearmpits +${shape} ${prefix}hentaifemdom +${shape} ${prefix}lewdanimegirls +${shape} ${prefix}biganimetiddies +${shape} ${prefix}animebellybutton +${shape} ${prefix}hentai4everyone +${shape} ${prefix}bj +${shape} ${prefix}ero +${shape} ${prefix}cum +${shape} ${prefix}feet +${shape} ${prefix}yuri +${shape} ${prefix}trap +${shape} ${prefix}lewd +${shape} ${prefix}feed +${shape} ${prefix}eron +${shape} ${prefix}solo +${shape} ${prefix}gasm +${shape} ${prefix}poke +${shape} ${prefix}anal +${shape} ${prefix}holo +${shape} ${prefix}tits +${shape} ${prefix}kuni +${shape} ${prefix}kiss +${shape} ${prefix}erok +${shape} ${prefix}smug +${shape} ${prefix}baka +${shape} ${prefix}solog +${shape} ${prefix}feetg +${shape} ${prefix}lewdk +${shape} ${prefix}waifu +${shape} ${prefix}pussy +${shape} ${prefix}femdom +${shape} ${prefix}cuddle +${shape} ${prefix}hentai +${shape} ${prefix}eroyuri +${shape} ${prefix}cum_jpg +${shape} ${prefix}blowjob +${shape} ${prefix}erofeet +${shape} ${prefix}holoero +${shape} ${prefix}classic +${shape} ${prefix}erokemo +${shape} ${prefix}fox_girl +${shape} ${prefix}futanari +${shape} ${prefix}lewdkemo +${shape} ${prefix}wallpaper +${shape} ${prefix}pussy_jpg +${shape} ${prefix}kemonomimi +${shape} ${prefix}nsfw_avatar ` await lol.editMessageText(text, { reply_markup: { @@ -261,48 +293,48 @@ exports.textpro = async(lol, user_id) => { prefix = config.prefix text = `Text Pro Me Menu : -❏ ${prefix}blackpink text -❏ ${prefix}neon text -❏ ${prefix}greenneon text -❏ ${prefix}advanceglow text -❏ ${prefix}futureneon text -❏ ${prefix}sandwriting text -❏ ${prefix}sandsummer text -❏ ${prefix}sandengraved text -❏ ${prefix}metaldark text -❏ ${prefix}neonlight text -❏ ${prefix}holographic text -❏ ${prefix}text1917 text -❏ ${prefix}minion text -❏ ${prefix}deluxesilver text -❏ ${prefix}newyearcard text -❏ ${prefix}bloodfrosted text -❏ ${prefix}halloween text -❏ ${prefix}jokerlogo text -❏ ${prefix}fireworksparkle text -❏ ${prefix}natureleaves text -❏ ${prefix}bokeh text -❏ ${prefix}toxic text -❏ ${prefix}strawberry text -❏ ${prefix}box3d text -❏ ${prefix}roadwarning text -❏ ${prefix}breakwall text -❏ ${prefix}icecold text -❏ ${prefix}luxury text -❏ ${prefix}cloud text -❏ ${prefix}summersand text -❏ ${prefix}horrorblood text -❏ ${prefix}thunder text -❏ ${prefix}pornhub text1 text2 -❏ ${prefix}glitch text1 text2 -❏ ${prefix}avenger text1 text2 -❏ ${prefix}space text1 text2 -❏ ${prefix}ninjalogo text1 text2 -❏ ${prefix}marvelstudio text1 text2 -❏ ${prefix}lionlogo text1 text2 -❏ ${prefix}wolflogo text1 text2 -❏ ${prefix}steel3d text1 text2 -❏ ${prefix}wallgravity text1 text2 +${shape} ${prefix}blackpink text +${shape} ${prefix}neon text +${shape} ${prefix}greenneon text +${shape} ${prefix}advanceglow text +${shape} ${prefix}futureneon text +${shape} ${prefix}sandwriting text +${shape} ${prefix}sandsummer text +${shape} ${prefix}sandengraved text +${shape} ${prefix}metaldark text +${shape} ${prefix}neonlight text +${shape} ${prefix}holographic text +${shape} ${prefix}text1917 text +${shape} ${prefix}minion text +${shape} ${prefix}deluxesilver text +${shape} ${prefix}newyearcard text +${shape} ${prefix}bloodfrosted text +${shape} ${prefix}halloween text +${shape} ${prefix}jokerlogo text +${shape} ${prefix}fireworksparkle text +${shape} ${prefix}natureleaves text +${shape} ${prefix}bokeh text +${shape} ${prefix}toxic text +${shape} ${prefix}strawberry text +${shape} ${prefix}box3d text +${shape} ${prefix}roadwarning text +${shape} ${prefix}breakwall text +${shape} ${prefix}icecold text +${shape} ${prefix}luxury text +${shape} ${prefix}cloud text +${shape} ${prefix}summersand text +${shape} ${prefix}horrorblood text +${shape} ${prefix}thunder text +${shape} ${prefix}pornhub text1 text2 +${shape} ${prefix}glitch text1 text2 +${shape} ${prefix}avenger text1 text2 +${shape} ${prefix}space text1 text2 +${shape} ${prefix}ninjalogo text1 text2 +${shape} ${prefix}marvelstudio text1 text2 +${shape} ${prefix}lionlogo text1 text2 +${shape} ${prefix}wolflogo text1 text2 +${shape} ${prefix}steel3d text1 text2 +${shape} ${prefix}wallgravity text1 text2 ` await lol.editMessageText(text, { reply_markup: { @@ -320,34 +352,34 @@ exports.phoxy = async(lol, user_id) => { prefix = config.prefix text = `Photo Oxy Menu : -❏ ${prefix}shadow text -❏ ${prefix}cup text -❏ ${prefix}cup1 text -❏ ${prefix}romance text -❏ ${prefix}smoke text -❏ ${prefix}burnpaper text -❏ ${prefix}lovemessage text -❏ ${prefix}undergrass text -❏ ${prefix}love text -❏ ${prefix}coffe text -❏ ${prefix}woodheart text -❏ ${prefix}woodenboard text -❏ ${prefix}summer3d text -❏ ${prefix}wolfmetal text -❏ ${prefix}nature3d text -❏ ${prefix}underwater text -❏ ${prefix}golderrose text -❏ ${prefix}summernature text -❏ ${prefix}letterleaves text -❏ ${prefix}glowingneon text -❏ ${prefix}fallleaves text -❏ ${prefix}flamming text -❏ ${prefix}harrypotter text -❏ ${prefix}carvedwood text -❏ ${prefix}tiktok text1 text2 -❏ ${prefix}arcade8bit text1 text2 -❏ ${prefix}battlefield4 text1 text2 -❏ ${prefix}pubg text1 text2 +${shape} ${prefix}shadow text +${shape} ${prefix}cup text +${shape} ${prefix}cup1 text +${shape} ${prefix}romance text +${shape} ${prefix}smoke text +${shape} ${prefix}burnpaper text +${shape} ${prefix}lovemessage text +${shape} ${prefix}undergrass text +${shape} ${prefix}love text +${shape} ${prefix}coffe text +${shape} ${prefix}woodheart text +${shape} ${prefix}woodenboard text +${shape} ${prefix}summer3d text +${shape} ${prefix}wolfmetal text +${shape} ${prefix}nature3d text +${shape} ${prefix}underwater text +${shape} ${prefix}golderrose text +${shape} ${prefix}summernature text +${shape} ${prefix}letterleaves text +${shape} ${prefix}glowingneon text +${shape} ${prefix}fallleaves text +${shape} ${prefix}flamming text +${shape} ${prefix}harrypotter text +${shape} ${prefix}carvedwood text +${shape} ${prefix}tiktok text1 text2 +${shape} ${prefix}arcade8bit text1 text2 +${shape} ${prefix}battlefield4 text1 text2 +${shape} ${prefix}pubg text1 text2 ` await lol.editMessageText(text, { reply_markup: { @@ -360,52 +392,193 @@ exports.phoxy = async(lol, user_id) => { }) } +exports.education = async(lol, user_id) => { + prefix = config.prefix + text = `Education To Help You Go To Schooln + +${shape} ${prefix}translate +${shape} ${prefix}brainly +${shape} ${prefix}kbbi +${shape} ${prefix}wiki +${shape} ${prefix}nulis +${shape} ${prefix}nulis1 +${shape} ${prefix}nulis2 +${shape} ${prefix}nulis3 +${shape} ${prefix}nulis4 +${shape} ${prefix}nulis5 +${shape} ${prefix}nulis6 +` + await lol.editMessageText(text, { + reply_markup: { + inline_keyboard: [ + [ + { text: 'Back', callback_data: 'help-' + user_id } + ] + ] + } + }) +} + +exports.game = async(lol, user_id) => { + prefix = config.prefix + text = `A Very Fun Game To Entertain You! +${shape} ${prefix}caklontong +${shape} ${prefix}tebakgambar +${shape} ${prefix}tebakbendera +${shape} ${prefix}tebakangka +${shape} ${prefix}siapaaku +${shape} ${prefix}asahotak +${shape} ${prefix}family100 +${shape} ${prefix}tebakkata +${shape} ${prefix}susunkata +${shape} ${prefix}meme +` + await lol.editMessageText(text, { + reply_markup: { + inline_keyboard: [ + [ + { text: 'Back', callback_data: 'help-' + user_id } + ] + ] + } + }) +} + +exports.user = async(lol, user_id) => { + prefix = config.prefix + text = `validate about your information! + +${shape} ${prefix}status +${shape} ${prefix}daftar +${shape} ${prefix}unreg +${shape} ${prefix}getid + +` +await lol.editMessageText(text, { + reply_markup: { + inline_keyboard: [ + [ + { text: 'Back', callback_data: 'help-' + user_id } + ] + ] + } + }) +} + +exports.info = async(lol, user_id) => { + prefix = config.prefix + text = `look for the latest information so you dont miss the information! + +${shape} ${prefix}igstalk +${shape} ${prefix}tiktokstalk +${shape} ${prefix}twitstalk +${shape} ${prefix}kodepos +${shape} ${prefix}covid +${shape} ${prefix}infogempa +${shape} ${prefix}infotsunami +${shape} ${prefix}infocuacabandara +${shape} ${prefix}infocuacadunia +` + +await lol.editMessageText(text, { + reply_markup: { + inline_keyboard: [ + [ + { text: 'Back', callback_data: 'help-' + user_id } + ] + ] + } + }) +} +exports.gc = async(lol, user_id) => { + prefix = config.prefix + text = `Command Only For Group! + +${shape} ${prefix}gcdesk +${shape} ${prefix}gctitle +${shape} ${prefix}gcpict +${shape} ${prefix}leave +${shape} ${prefix}delpict +${shape} ${prefix}infochat +${shape} ${prefix}chatscount +` +await lol.editMessageText(text, { + reply_markup: { + inline_keyboard: [ + [ + { text: 'Back', callback_data: 'help-' + user_id } + ] + ] + } + }) +} +exports.owner = async(lol, user_id) => { + prefix = config.prefix + text = `Owner's Special Features So You Can't Use It + +${shape} ${prefix}ban +${shape} ${prefix}unban +${shape} ${prefix}adduser +${shape} ${prefix}resetban +${shape} ${prefix}resetuser +${shape} ${prefix}shutdown +` +await lol.editMessageText(text, { + reply_markup: { + inline_keyboard: [ + [ + { text: 'Back', callback_data: 'help-' + user_id } + ] + ] + } + }) +} exports.ephoto = async(lol, user_id) => { prefix = config.prefix text = `Ephoto 360 Menu : -❏ ${prefix}wetglass text -❏ ${prefix}multicolor3d text -❏ ${prefix}watercolor text -❏ ${prefix}luxurygold text -❏ ${prefix}galaxywallpaper text -❏ ${prefix}lighttext text -❏ ${prefix}beautifulflower text -❏ ${prefix}puppycute text -❏ ${prefix}royaltext text -❏ ${prefix}heartshaped text -❏ ${prefix}birthdaycake text -❏ ${prefix}galaxystyle text -❏ ${prefix}hologram3d text -❏ ${prefix}greenneon text -❏ ${prefix}glossychrome text -❏ ${prefix}greenbush text -❏ ${prefix}metallogo text -❏ ${prefix}noeltext text -❏ ${prefix}glittergold text -❏ ${prefix}textcake text -❏ ${prefix}starsnight text -❏ ${prefix}wooden3d text -❏ ${prefix}textbyname text -❏ ${prefix}writegalacy text -❏ ${prefix}galaxybat text -❏ ${prefix}snow3d text -❏ ${prefix}birthdayday text -❏ ${prefix}goldplaybutton text -❏ ${prefix}silverplaybutton text -❏ ${prefix}freefire text -❏ ${prefix}cartoongravity text -❏ ${prefix}anonymhacker text -❏ ${prefix}anonymhacker text -❏ ${prefix}mlwall text -❏ ${prefix}pubgmaskot text -❏ ${prefix}aovwall text -❏ ${prefix}logogaming text -❏ ${prefix}fpslogo text -❏ ${prefix}avatarlolnew text -❏ ${prefix}lolbanner text -❏ ${prefix}avatardota text +${shape} ${prefix}wetglass text +${shape} ${prefix}multicolor3d text +${shape} ${prefix}watercolor text +${shape} ${prefix}luxurygold text +${shape} ${prefix}galaxywallpaper text +${shape} ${prefix}lighttext text +${shape} ${prefix}beautifulflower text +${shape} ${prefix}puppycute text +${shape} ${prefix}royaltext text +${shape} ${prefix}heartshaped text +${shape} ${prefix}birthdaycake text +${shape} ${prefix}galaxystyle text +${shape} ${prefix}hologram3d text +${shape} ${prefix}greenneon text +${shape} ${prefix}glossychrome text +${shape} ${prefix}greenbush text +${shape} ${prefix}metallogo text +${shape} ${prefix}noeltext text +${shape} ${prefix}glittergold text +${shape} ${prefix}textcake text +${shape} ${prefix}starsnight text +${shape} ${prefix}wooden3d text +${shape} ${prefix}textbyname text +${shape} ${prefix}writegalacy text +${shape} ${prefix}galaxybat text +${shape} ${prefix}snow3d text +${shape} ${prefix}birthdayday text +${shape} ${prefix}goldplaybutton text +${shape} ${prefix}silverplaybutton text +${shape} ${prefix}freefire text +${shape} ${prefix}cartoongravity text +${shape} ${prefix}anonymhacker text +${shape} ${prefix}anonymhacker text +${shape} ${prefix}mlwall text +${shape} ${prefix}pubgmaskot text +${shape} ${prefix}aovwall text +${shape} ${prefix}logogaming text +${shape} ${prefix}fpslogo text +${shape} ${prefix}avatarlolnew text +${shape} ${prefix}lolbanner text +${shape} ${prefix}avatardota text ` await lol.editMessageText(text, { reply_markup: { @@ -420,4 +593,4 @@ exports.ephoto = async(lol, user_id) => { exports.messageError = async(lol) => { await lol.reply(`Error! Please report to the [${config.owner}](${config.ownerLink}) about this`, { parse_mode: "Markdown", disable_web_page_preview: true }) -} \ No newline at end of file +} From 6c632f80e40311df8d8a84e92ce4350bdd47f685 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 21:58:51 +0700 Subject: [PATCH 09/18] Update index.js Added some features and made improvements to some features --- index.js | 882 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 829 insertions(+), 53 deletions(-) diff --git a/index.js b/index.js index 49984a5..7c4c2d8 100644 --- a/index.js +++ b/index.js @@ -1,12 +1,28 @@ -const { fetchJson, range, parseMarkdown } = require('./lib/function') +/* + + Base: LoL-Human + Recode: BryanRfly + +Ojo Lali Tuku Apikey Ben Fitur'e Mlaku Kabehh😆 +*/ +const { fetchJson, range, parseMarkdown } = require('./lib/function') const { Telegraf } = require('telegraf') +const ig = require('insta-fetcher') +const speed = require('performance-now') const help = require('./lib/help') const tele = require('./lib/tele') -const chalk = require('chalk') +const chalk = require('chalk') +const axios = require('axios') const os = require('os') -const fs = require('fs') +const fs = require('fs') +const mess = JSON.parse(fs.readFileSync(`./mess.json`)) +const _user = JSON.parse(fs.readFileSync(`./lib/user.json`)) +const _ban = JSON.parse(fs.readFileSync('./lib/banned.json')) -const { +const hem = '```' +const { + usernameOwner, + xkey, apikey, bot_token, owner, @@ -21,6 +37,7 @@ if (bot_token == "") { const bot = new Telegraf(bot_token) + bot.on("new_chat_members", async(lol) => { var message = lol.message var pp_group = await tele.getPhotoProfile(message.chat.id) @@ -30,7 +47,7 @@ bot.on("new_chat_members", async(lol) => { var pp_user = await tele.getPhotoProfile(x.id) var full_name = tele.getUser(x).full_name console.log(chalk.whiteBright("├"), chalk.cyanBright("[ JOINS ]"), chalk.whiteBright(full_name), chalk.greenBright("join in"), chalk.whiteBright(groupname)) - await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/base/welcome?apikey=${apikey}&img1=${pp_user}&img2=${pp_group}&background=https://i.ibb.co/8B6Q84n/LTqHsfYS.jpg&username=${full_name}&member=${groupmembers}&groupname=${groupname}` }) + await lol.replyWithPhoto({ url: `https://hardianto-chan.herokuapp.com/api/tools/welcomer?nama=${full_name}&namaGb=${groupname}&pepeGb=${pp_group}&totalMem=${groupmembers}&pepeUser=${pp_user}&bege=https://telegra.ph/file/833c102f481b7fc37ff1b.jpg&apikey=hardianto` }, {caption: `Welcome Kak ${full_name}`, parse_mode: "Markdown" }) } }) @@ -44,14 +61,8 @@ bot.on("left_chat_member", async(lol) => { var pp_user = await tele.getPhotoProfile(message.left_chat_member.id) var full_name = tele.getUser(message.left_chat_member).full_name console.log(chalk.whiteBright("├"), chalk.cyanBright("[ LEAVE ]"), chalk.whiteBright(full_name), chalk.greenBright("leave from"), chalk.whiteBright(groupname)) - await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/base/leave?apikey=${apikey}&img1=${pp_user}&img2=${pp_group}&background=https://i.ibb.co/8B6Q84n/LTqHsfYS.jpg&username=${full_name}&member=${groupmembers}&groupname=${groupname}` }) -}) - -bot.command('start', async(lol) => { - user = tele.getUser(lol.message.from) - await help.start(lol, user.full_name) - await lol.deleteMessage() -}) + await lol.replyWithPhoto({ url: `https://hardianto-chan.herokuapp.com/api/tools/leave?nama=${full_name}&namaGb=${groupname}&pepeGb=${pp_group}&totalMem=${groupmembers}&pepeUser=${pp_user}&bege=https://telegra.ph/file/833c102f481b7fc37ff1b.jpg&apikey=hardianto` }, {caption: `GoodBye Kak ${full_name}`, parse_mode: "Markdown" }) + }) bot.command('help', async(lol) => { user = tele.getUser(lol.message.from) @@ -63,7 +74,8 @@ bot.on("callback_query", async(lol) => { user_id = Number(cb_data[1]) if (lol.callbackQuery.from.id != user_id) return lol.answerCbQuery("Sorry, You do not have the right to access this button.", { show_alert: true }) callback_data = cb_data[0] - user = tele.getUser(lol.callbackQuery.from) + const user = tele.getUser(lol.callbackQuery.from) + const chatid = lol.chat.id const isGroup = lol.chat.type.includes("group") const groupName = isGroup ? lol.chat.title : "" if (!isGroup) console.log(chalk.whiteBright("├"), chalk.cyanBright("[ ACTIONS ]"), chalk.whiteBright(callback_data), chalk.greenBright("from"), chalk.whiteBright(user.full_name)) @@ -80,17 +92,26 @@ bot.on("message", async(lol) => { if (prefix != "" && body.startsWith(prefix)) { cmd = true comm = body.slice(1).trim().split(" ").shift().toLowerCase() - } - const command = comm + } + + + const command = comm const args = await tele.getArgs(lol) - const user = tele.getUser(lol.message.from) + const user = tele.getUser(lol.message.from) + const itsme = tele.getBot(lol.message) + const ownerId = [usernameOwner] + + const isUser = _user.includes(user.id) + const isBann = _ban.includes(user.username) + const isOwner = ownerId.includes(user.username) const reply = async(text) => { for (var x of range(0, text.length, 4096)) { return await lol.replyWithMarkdown(text.substr(x, 4096), { disable_web_page_preview: true }) } } - + + const query = args.join(' ') const isCmd = cmd const isGroup = lol.chat.type.includes("group") const groupName = isGroup ? lol.chat.title : "" @@ -126,10 +147,10 @@ bot.on("message", async(lol) => { else if (isDocument) typeMessage = "Document" else if (isAnimation) typeMessage = "Animation" - if (!isGroup && !isCmd) console.log(chalk.whiteBright("├"), chalk.cyanBright("[ PRIVATE ]"), chalk.whiteBright(typeMessage), chalk.greenBright("from"), chalk.whiteBright(user.full_name)) - if (isGroup && !isCmd) console.log(chalk.whiteBright("├"), chalk.cyanBright("[ GROUP ]"), chalk.whiteBright(typeMessage), chalk.greenBright("from"), chalk.whiteBright(user.full_name), chalk.greenBright("in"), chalk.whiteBright(groupName)) - if (!isGroup && isCmd) console.log(chalk.whiteBright("├"), chalk.cyanBright("[ COMMAND ]"), chalk.whiteBright(typeMessage), chalk.greenBright("from"), chalk.whiteBright(user.full_name)) - if (isGroup && isCmd) console.log(chalk.whiteBright("├"), chalk.cyanBright("[ COMMAND ]"), chalk.whiteBright(typeMessage), chalk.greenBright("from"), chalk.whiteBright(user.full_name), chalk.greenBright("in"), chalk.whiteBright(groupName)) + if (!isGroup && !isCmd) console.log(chalk.whiteBright("├"), chalk.cyanBright("[ PRIVATE ]"), chalk.whiteBright(typeMessage), chalk.greenBright("from"), chalk.whiteBright(user.username)) + if (isGroup && !isCmd) console.log(chalk.whiteBright("├"), chalk.cyanBright("[ GROUP ]"), chalk.whiteBright(typeMessage), chalk.greenBright("from"), chalk.whiteBright(user.username), chalk.greenBright("in"), chalk.whiteBright(groupName)) + if (!isGroup && isCmd) console.log(chalk.whiteBright("├"), chalk.cyanBright("[ COMMAND ]"), chalk.whiteBright(typeMessage), chalk.greenBright("from"), chalk.whiteBright(user.username)) + if (isGroup && isCmd) console.log(chalk.whiteBright("├"), chalk.cyanBright("[ COMMAND ]"), chalk.whiteBright(typeMessage), chalk.greenBright("from"), chalk.whiteBright(user.username), chalk.greenBright("in"), chalk.whiteBright(groupName)) var file_id = "" if (isQuoted) { @@ -140,14 +161,19 @@ bot.on("message", async(lol) => { isQuotedAnimation ? lol.message.reply_to_message.animation.file_id : "" } var mediaLink = file_id != "" ? await tele.getLink(file_id) : "" - + + switch (command) { - case 'help': - await help.help(lol, user.full_name, lol.message.from.id.toString()) + case 'help': + runtime = process.uptime() + if (!isUser) return await reply(mess.ser) + await help.help(lol, user.full_name, lol.message.from.id.toString()) break // Islami // case 'listsurah': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) result = await fetchJson(`https://api.lolhuman.xyz/api/quran?apikey=${apikey}`) result = result.result text = 'List Surah:\n' @@ -157,6 +183,8 @@ bot.on("message", async(lol) => { await reply(text) break case 'alquran': + if (isBann) return reply(mess.ban) + if (!isUser) return await reply(mess.ser) if (args.length < 1) return await reply(`Example: ${prefix + command} 18 or ${prefix + command} 18/10 or ${prefix + command} 18/1-10`) urls = `https://api.lolhuman.xyz/api/quran/${args[0]}?apikey=${apikey}` quran = await fetchJson(urls) @@ -173,11 +201,13 @@ bot.on("message", async(lol) => { await reply(text) break case 'alquranaudio': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} 18 or ${prefix + command} 18/10`) surah = args[0] await lol.replyWithAudio({ url: `https://api.lolhuman.xyz/api/quran/audio/${surah}?apikey=${apikey}` }) break case 'asmaulhusna': + if (!isUser) return await reply(mess.ser) result = await fetchJson(`https://api.lolhuman.xyz/api/asmaulhusna?apikey=${apikey}`) result = result.result text = `\`No :\` *${result.index}*\n` @@ -188,6 +218,7 @@ bot.on("message", async(lol) => { await reply(text) break case 'kisahnabi': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Muhammad`) query = args.join(" ") result = await fetchJson(`https://api.lolhuman.xyz/api/kisahnabi/${query}?apikey=${apikey}`) @@ -200,6 +231,7 @@ bot.on("message", async(lol) => { await reply(text) break case 'jadwalsholat': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Yogyakarta`) daerah = args.join(" ") result = await fetchJson(`https://api.lolhuman.xyz/api/sholat/${daerah}?apikey=${apikey}`) @@ -220,16 +252,20 @@ bot.on("message", async(lol) => { // Downloader // case 'ytplay': - if (args.length == 0) return await reply(`Example: ${prefix + command} melukis senja`) - await fetchJson(`https://api.lolhuman.xyz/api/ytsearch?apikey=${apikey}&query=${args.join(" ")}`) - .then(async(result) => { - await fetchJson(`https://api.lolhuman.xyz/api/ytaudio2?apikey=${apikey}&url=https://www.youtube.com/watch?v=${result.result[0].videoId}`) - .then(async(result) => { - await lol.replyWithAudio({ url: result.result.link, filename: result.result.title }, { thumb: result.result.thumbnail }) - }) - }) - break + case 'playyt': + case 'play': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!query) return reply('Input Teks') + try { + result = await fetchJson(`https://api.xteam.xyz/dl/play?lagu=${query}&APIKEY=${xkey}`) + await lol.replyWithVideo({ url:`${result.url}` }) + } catch(e) { + reply('' + e) + } + break case 'ytsearch': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Melukis Senja`) try { query = args.join(" ") @@ -243,10 +279,11 @@ bot.on("message", async(lol) => { await lol.replyWithPhoto({ url: res.thumbnail }, { caption: caption, parse_mode: "Markdown" }) }) } catch (e) { - await help.messageError(lol) + await reply('' + e) } break case 'ytmp3': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://www.youtube.com/watch?v=qZIQAk-BUEc`) result = await fetchJson(`https://api.lolhuman.xyz/api/ytaudio2?apikey=${apikey}&url=${ args[0]}`) result = result.result @@ -257,6 +294,7 @@ bot.on("message", async(lol) => { await lol.replyWithAudio({ url: result.link, filename: result.title }) break case 'ytmp4': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://www.youtube.com/watch?v=qZIQAk-BUEc`) result = await fetchJson(`https://api.lolhuman.xyz/api/ytaudio2?apikey=${apikey}&url=${ args[0]}`) result = result.result @@ -267,28 +305,33 @@ bot.on("message", async(lol) => { await lol.replyWithVideo({ url: result.link }) break case 'tiktoknowm': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://vt.tiktok.com/ZSwWCk5o/`) url = `https://api.lolhuman.xyz/api/tiktok2?apikey=${apikey}&url=${args[0]}` result = await fetchJson(url) await lol.replyWithVideo({ url: result.result }) break case 'tiktokmusic': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://vt.tiktok.com/ZSwWCk5o/`) await lol.replyWithAudio({ url: `https://api.lolhuman.xyz/api/tiktokmusic?apikey=${apikey}&url=${args[0]}` }) break case 'twitterimage': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://twitter.com/memefess/status/1385161473232543747`) url = `https://api.lolhuman.xyz/api/twitterimage?apikey=${apikey}&url=${args[0]}` result = await fetchJson(url) await lol.replyWithPhoto({ url: result.result.link }, { caption: result.result.title }) break case 'twittervideo': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://twitter.com/gofoodindonesia/status/1229369819511709697`) url = `https://api.lolhuman.xyz/api/twitter2?apikey=${apikey}&url=${args[0]}` result = await fetchJson(url) await lol.replyWithVideo({ url: result.result.link[0].url }) break case 'spotify': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://open.spotify.com/track/0ZEYRVISCaqz5yamWZWzaA`) result = await fetchJson(`https://api.lolhuman.xyz/api/spotify?apikey=${apikey}&url=${args[0]}`) result = result.result @@ -300,6 +343,7 @@ bot.on("message", async(lol) => { await lol.replyWithAudio({ url: result.link }, { title: result.title, thumb: result.thumbnail }) break case 'spotifysearch': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Melukis Senja`) try { query = args.join(" ") @@ -317,6 +361,7 @@ bot.on("message", async(lol) => { } break case 'jooxplay': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Melukis Senja`) query = args.join(" ") result = await fetchJson(`https://api.lolhuman.xyz/api/jooxplay?apikey=${apikey}&query=${query}`) @@ -336,6 +381,7 @@ bot.on("message", async(lol) => { await lol.replyWithAudio({ url: result.audio[0].link, filename: result.info.song }, { thumb: result.image }) break case 'zippyshare': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://www51.zippyshare.com/v/5W0TOBz1/file.html`) url = await fetchJson(`https://api.lolhuman.xyz/api/zippyshare?apikey=${apikey}&url=${args[0]}`) url = url.result @@ -345,32 +391,42 @@ bot.on("message", async(lol) => { text += `\`❖ Download Url :\` *${url.download_url}*` await reply(text) break - case 'pinterest': - if (args.length == 0) return await reply(`Example: ${prefix + command} loli kawaii`) - query = args.join(" ") - url = await fetchJson(`https://api.lolhuman.xyz/api/pinterest?apikey=${apikey}&query=${query}`) - url = url.result - await lol.replyWithPhoto({ url: url }) - break - case 'pinterestdl': + case 'pinterestdl': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://id.pinterest.com/pin/696580267364426905/`) url = await fetchJson(`https://api.lolhuman.xyz/api/pinterestdl?apikey=${apikey}&url=${args[0]}`) url = url.result["736x"] await lol.replyWithPhoto({ url: url }) break case 'pixiv': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} loli kawaii`) query = args.join(" ") await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/pixiv?apikey=${apikey}&query=${query}` }) break case 'pixivdl': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} 63456028`) pixivid = args[0] await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/pixivdl/${pixivid}?apikey=${apikey}` }) - break - + break + case 'pinterest': + case 'image': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + if (!query) return await reply('Input Query') + try { + ini_image = await fetchJson(`https://fdciabdul.tech/api/pinterest/?keyword=${query}`) + ini_hasilp = JSON.parse(JSON.stringify(ini_image)); + ini_hasil1 = ini_hasilp[Math.floor(Math.random() * ini_hasilp.length)]; + await lol.replyWithPhoto({ url: `${ini_hasil1}` }) + } catch(e) { + reply('Status ' + e) + } + break // Searching case 'reverse': + if (!isUser) return await reply(mess.ser) if (!isQuotedImage) return await reply(`Please reply a image use this command.`) google = await fetchJson(`https://api.lolhuman.xyz/api/googlereverse?apikey=${apikey}&img=${mediaLink}`) yandex = await fetchJson(`https://api.lolhuman.xyz/api/reverseyandex?apikey=${apikey}&img=${mediaLink}`) @@ -389,6 +445,7 @@ bot.on("message", async(lol) => { // AniManga // case 'character': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Miku Nakano`) query = args.join(" ") result = await fetchJson(`https://api.lolhuman.xyz/api/character?apikey=${apikey}&query=${query}`) @@ -406,6 +463,7 @@ bot.on("message", async(lol) => { await lol.replyWithPhoto({ url: result.image.large }, { caption: text }) break case 'manga': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Gotoubun No Hanayome`) query = args.join(" ") result = await fetchJson(`https://api.lolhuman.xyz/api/manga?apikey=${apikey}&query=${query}`) @@ -434,6 +492,7 @@ bot.on("message", async(lol) => { await lol.replyWithPhoto({ url: result.coverImage.large }, { caption: text }) break case 'anime': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Gotoubun No Hanayome`) query = args.join(" ") result = await fetchJson(`https://api.lolhuman.xyz/api/anime?apikey=${apikey}&query=${query}`) @@ -464,7 +523,8 @@ bot.on("message", async(lol) => { await lol.replyWithPhoto({ url: result.coverImage.large }, { caption: text }) break case 'wait': - if (isQuotedImage || isQuotedAnimation || isQuotedVideo || isQuotedDocument) { + if (!isUser) return await reply(mess.ser) + if (isQuotedImage || isQuotedAnimation || isQuotedVideo || isQuotedDocument) { url_file = await tele.getLink(file_id) result = await fetchJson(`https://api.lolhuman.xyz/api/wait?apikey=${apikey}&img=${url_file}`) result = result.result @@ -482,6 +542,7 @@ bot.on("message", async(lol) => { } break case 'kusonime': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://kusonime.com/nanatsu-no-taizai-bd-batch-subtitle-indonesia/`) result = await fetchJson(`https://api.lolhuman.xyz/api/kusonime?apikey=${apikey}&url=${args[0]}`) result = result.result @@ -510,6 +571,7 @@ bot.on("message", async(lol) => { await reply(text) break case 'kusonimesearch': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Gotoubun No Hanayome`) query = args.join(" ") result = await fetchJson(`https://api.lolhuman.xyz/api/kusonimesearch?apikey=${apikey}&query=${query}`) @@ -539,6 +601,7 @@ bot.on("message", async(lol) => { await reply(text) break case 'otakudesu': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://otakudesu.tv/lengkap/pslcns-sub-indo/`) result = await fetchJson(`https://api.lolhuman.xyz/api/otakudesu?apikey=${apikey}&url=${args[0]}`) result = result.result @@ -572,6 +635,7 @@ bot.on("message", async(lol) => { await reply(text) break case 'otakudesusearch': + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Gotoubun No Hanayome`) query = args.join(" ") result = await fetchJson(`https://api.lolhuman.xyz/api/otakudesusearch?apikey=${apikey}&query=${query}`) @@ -607,6 +671,8 @@ bot.on("message", async(lol) => { // Movie & Story case 'lk21': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Transformer`) query = args.join(" ") result = await fetchJson(`https://api.lolhuman.xyz/api/lk21?apikey=${apikey}&query=${query}`) @@ -627,6 +693,8 @@ bot.on("message", async(lol) => { await lol.replyWithPhoto({ url: result.thumbnail }, { caption: text }) break case 'drakorongoing': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) result = await fetchJson(`https://api.lolhuman.xyz/api/drakorongoing?apikey=${apikey}`) result = result.result text = "Ongoing Drakor\n\n" @@ -641,6 +709,8 @@ bot.on("message", async(lol) => { await reply(text) break case 'wattpad': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} https://www.wattpad.com/707367860-kumpulan-quote-tere-liye-tere-liye-quote-quote`) result = await fetchJson(`https://api.lolhuman.xyz/api/wattpad?apikey=${apikey}&url=${args[0]}`) result = result.result @@ -658,6 +728,8 @@ bot.on("message", async(lol) => { await lol.replyWithPhoto({ url: result.photo }, { caption: text }) break case 'wattpadsearch': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} Tere Liye`) query = args.join(" ") result = await fetchJson(`https://api.lolhuman.xyz/api/wattpadsearch?apikey=${apikey}&query=${query}`) @@ -674,6 +746,8 @@ bot.on("message", async(lol) => { await reply(text) break case 'cerpen': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) result = await fetchJson(`https://api.lolhuman.xyz/api/cerpen?apikey=${apikey}`) result = result.result text = `Title : ${result.title}\n` @@ -682,6 +756,8 @@ bot.on("message", async(lol) => { await reply(text) break case 'ceritahoror': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) result = await fetchJson(`https://api.lolhuman.xyz/api/ceritahoror?apikey=${apikey}`) result = result.result text = `Title : ${result.title}\n` @@ -692,30 +768,42 @@ bot.on("message", async(lol) => { // Random Text // case 'quotes': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) quotes = await fetchJson(`https://api.lolhuman.xyz/api/random/quotes?apikey=${apikey}`) quotes = quotes.result await reply(`_${quotes.by}_\n\n*― ${quotes.quote}*`) break case 'quotesanime': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) quotes = await fetchJson(`https://api.lolhuman.xyz/api/random/quotesnime?apikey=${apikey}`) quotes = quotes.result await reply(`_${quotes.quote}_\n\n*― ${quotes.character}*\n*― ${quotes.anime} ${quotes.episode}*`) break case 'quotesdilan': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) quotedilan = await fetchJson(`https://api.lolhuman.xyz/api/quotes/dilan?apikey=${apikey}`) await reply(quotedilan.result) break case 'quotesimage': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/random/${command}?apikey=${apikey}` }) break case 'faktaunik': case 'katabijak': case 'pantun': case 'bucin': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) result = await fetchJson(`https://api.lolhuman.xyz/api/random/${command}?apikey=${apikey}`) await reply(result.result) break case 'randomnama': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) result = await fetchJson(`https://api.lolhuman.xyz/api/random/nama?apikey=${apikey}`) await reply(result.result) break @@ -734,6 +822,8 @@ bot.on("message", async(lol) => { case 'shinobu': case 'megumin': case 'wallnime': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/random/${command}?apikey=${apikey}` }) break case 'chiisaihentai': @@ -755,6 +845,8 @@ bot.on("message", async(lol) => { case 'biganimetiddies': case 'animebellybutton': case 'hentai4everyone': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/random/nsfw/${command}?apikey=${apikey}` }) break case 'bj': @@ -799,6 +891,8 @@ bot.on("message", async(lol) => { case 'pussy_jpg': case 'kemonomimi': case 'nsfw_avatar': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/random2/${command}?apikey=${apikey}` }) break @@ -835,6 +929,8 @@ bot.on("message", async(lol) => { case 'summersand': case 'horrorblood': case 'thunder': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} LoL Human`) text = args.join(" ") await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/textprome/${command}?apikey=${apikey}&text=${text}` }) @@ -849,6 +945,8 @@ bot.on("message", async(lol) => { case 'wolflogo': case 'steel3d': case 'wallgravity': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} LoL Human`) await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/textprome2/${command}?apikey=${apikey}&text1=${args[0]}&text2=${args[1]}` }) break @@ -878,6 +976,8 @@ bot.on("message", async(lol) => { case 'flamming': case 'harrypotter': case 'carvedwood': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} LoL Human`) await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/photooxy1/${command}?apikey=${apikey}&text=${args.join(" ")}` }) break @@ -885,6 +985,8 @@ bot.on("message", async(lol) => { case 'arcade8bit': case 'battlefield4': case 'pubg': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} LoL Human`) await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/photooxy2/${command}?apikey=${apikey}&text1=${args[0]}&text2=${args[1]}` }) break @@ -931,21 +1033,695 @@ bot.on("message", async(lol) => { case 'avatarlolnew': case 'lolbanner': case 'avatardota': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) if (args.length == 0) return await reply(`Example: ${prefix + command} LoL Human`) await lol.replyWithPhoto({ url: `https://api.lolhuman.xyz/api/ephoto1/${command}?apikey=${apikey}&text=${args.join(" ")}` }) + break + case 'return': + if (!isOwner) return reply('Khusus Owner Kak') + try { + return bot.telegram.sendMessage(lol.message.chat.id, JSON.stringify(eval(args.join('')), null, '\t'), lol.replyWithChatAction("typing")) + } catch(e) { + reply(`Error: ${e}`) + } + break + + case 'owner': + try { + await bot.telegram.sendContact(lol.message.chat.id, '6289649480997', 'BryanRfly', 'Bryan', 'Rfly', '+62 896-4948-0997', 'silently', 'ID', 'true') + } catch(e) { + reply('' + e) + } + break + case 'emote': + try { + p = ["🐷","🌝","🐷","🌝","🤗","❣️","😉"] + await bot.telegram.sendDice(lol.message.chat.id, p) + } catch(e) { + reply('' + e) + } break - case 'test': - test = await bot.telegram.getChatMembersCount(lol.message.chat.id) - console.log(test) + case 'inf': + pk = await lol.message + console.log(pk) + reply('' + pk) + break + case 'testt': + await bot.telegram.sendMessage(chatid, 'Hai Kak') break + //EDUCATION MENU + case 'translate': + case 'tr': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!query) return reply(`contoh: ${prefix + command} en i love you`) + try { + result = await fetchJson(`https://kocakz.herokuapp.com/api/edu/translate?lang=${args[0]}&text=${args[1]}`) + text = `Hasil: ${result.text}` + await reply(text) + } catch(e) { + reply('' + e) + } + break + case 'nulis': + case 'tulis': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + if (!query) return await reply('Input Teks') + try { + await lol.replyWithPhoto({ url: `https://hardianto-chan.herokuapp.com/api/maker/nulis?apikey=hardianto&text=${query}` }) + } catch(e) { + reply('Status ' + e) + } + break + case 'nulis1': + case 'nulis2': + case 'nulis3': + case 'nulis4': + case 'nulis5': + case 'nulis6': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!query) return reply('Input Teks!') + try { + caption = `Semangat Belajarnya Ya Kak!🙂` + await lol.replyWithPhoto({ url: `https://api.xteam.xyz/mager${command}?text=${query}&APIKEY=${xkey}` }, {caption: caption, parse_mode: "Markdown"}) + } catch(e) { + reply('Status ' + e) + } + break + case 'brainly': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + try { + if (!query) return await reply('Input Query!') + result = await axios.get(`https://api.xteam.xyz/brainly?soal=${query}&APIKEY=${xkey}`) + await reply(result.data.jawaban) + } catch(e) { + reply('Status ' + e) + } + break + case 'kbbi': + if (!isUser) return await reply(mess.ser) + if (isBann) return await reply(mess.ban) + if (!query) return await reply('Input Query') + try { + ppek = await fetchJson(`https://hardianto-chan.herokuapp.com/api/info/kbbi?kata=${query}&apikey=hardianto`) + kntl = `Input: ${query}\n\nArti: ${ppek.result.arti}` + await reply(kntl) + } catch(e) { + reply('Status ' + e) + } + break + case 'wiki': + case 'wikipedia': + if (!query) return await reply('Input Query!') + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + try { + wiki = await fetchJson(`https://hardianto-chan.herokuapp.com/api/info/wikipedia?search=${query}&apikey=hardianto`) + pedia = `Query: ${query}\n\nResult: ${wiki.result.result}` + reply(pedia) + } catch(e) { + reply('Status ' + e) + } + break + //FUN.MENU + case 'meme': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(`Silahkan Daftar Dahulu\n\nCara Daftar Cukup Ketik ${prefix}daftar`) + try { + result = await fetchJson(`https://hardianto-chan.herokuapp.com/api/random/meme?apikey=hardianto`) + ttle = `Title: ${result.result.title}\nAuthor: ${result.result.author}` + mme = `${result.result.url}` + await lol.replyWithPhoto({ url: `https://api.xteam.xyz/asupan/darkjoke?APIKEY=${xkey}` }) + await lol.replyWithPhoto({ url: `${mme}` }, {caption: ttle, parse_mode: "Markdown"}) + } catch(e) { + reply('Status ' + e) + } + break + case 'tebakgambar': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + try { + anu = await fetchJson(`https://api.xteam.xyz/game/tebakgambar?APIKEY=${xkey}`) + gmbr = `${anu.url}` + await lol.replyWithPhoto({ url: `${gmbr}` }) + bntu = `Bantuan ${anu.bantuan}\n\nWaktu Menjawab 30 Detik Di Mulai Dari Sekarang!` + await reply(bntu) + jwb = `Jawaban: ${anu.jawaban}` + setTimeout( () => { + reply(jwb) + }, 30000) + setTimeout( () => { + reply(mess.hbis) + }, 20000) + } catch(e) { + reply('Status' + e) + } + break + case 'caklontong': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + try { + result = await fetchJson('https://hardianto-chan.herokuapp.com/api/kuis/caklontong?apikey=hardianto') + soal = `Pertanyaan: ${result.result.soal}\n\nWaktu Menjawab 30 Detik Di Mulai Dari Sekarang!` + await reply(soal) + jwbn = `Jawaban; ${result.result.jawaban}\n\npenjelasan ${result.result.deskripsi}` + setTimeout( () => { + reply(jwbn) + }, 30000) + setTimeout( () => { + reply(mess.hbis) + }, 20000) + } catch(e) { + reply('Status ' + e) + } + break + case 'tebakbendera': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + try { + anu = await fetchJson(`https://api.xteam.xyz/game/tebakbendera?APIKEY=${xkey}`) + bndr = `jawablah pertanyaan ini dengan waktu 30 detik!, bendera negara manakah ini?\n\n=>${anu.bendera}` + await reply(bndr) + jwbn = `jawaban: ${anu.jawaban}` + setTimeout( () => { + reply(jwbn) + }, 30000) + setTimeout( () => { + reply(mess.hbis) + }, 20000) + } catch (e) { + reply('Status ' + e) + } + break + case 'tebakangka': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + if (!query) return await reply('Input Angka Pilihan Mu 1-100') + sesid = Math.floor(Math.random() * 100) + text = `Kamu: ${query}\n\nBot: ${sesid}` + await reply(text) + break + case 'siapaaku': + case 'siapaku': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + try { + result = await fetchJson(`https://api.xteam.xyz/game/siapakahaku?APIKEY=${xkey}`) + lvl = `${result.result.level}` + sal = `${result.result.soal}` + jbnn = `${result.result.jawaban}` + text1 = `simaklah pertanyaan di bawah ini lalu jawablah dengan benar, waktu yang diberikan 30 detik di mulai dari sekarang!,\n\nlevel: ${lvl}\n\npertannyaan ${sal}` + text2 = `jawaban: ${jbnn}` + await reply(text1) + setTimeout( () => { + reply(text2) + }, 30000) + setTimeout( () => { + reply(mess.hbis) + }, 20000) + } catch(e) { + reply('Status ' + e) + } + break + case 'susunkata': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(`Silahkan Daftar Dahulu\n\nCara Daftar ${prefix}daftar`) + try { + result = await fetchJson(`https://api.xteam.xyz/game/susunkata?APIKEY=${xkey}`) + soall = `Susunlah Kata Acak Di Bawah Ini Menjadi Sebuah Kata Padu!,Waktu 30 Detik Di Mulai Dari Sekarang!\n\nLevel: ${result.result.level}\n\nKata: ${result.result.soal}` + jwnn = `Jawaban: ${result.result.jawaban}` + babi = `${result.result.jawaban}` + await reply(soall) + if (!babi) return reply('Jawaban Mu Benar!') + setTimeout( () => { + reply(jwnn) + }, 30000) + setTimeout( () => { + reply(mess.hbis) + }, 20000) + } catch(e) { + reply('Status ' + e) + } + break + case 'tebakkata': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + try { + result = await fetchJson(`https://api.xteam.xyz/game/tebakkata?APIKEY=${xkey}`) + soll = `jawab lah pertanyaan berikut dengan benar!,waktu 30 detik di mulai dari sekarang!\n\nLwvel: ${result.result.level}\n\nSoal: ${result.result.soal}` + jwbnn = `jawaban ${result.result.jawaban}` + await reply(soll) + setTimeout( () => { + reply(jwbnn) + }, 30000) + setTimeout( () => { + reply(mess.hbis) + }, 20000) + } catch(e) { + reply('Status ' + e) + } + break + case 'family100': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + try { + result = await fetchJson(`https://api.xteam.xyz/game/family100?APIKEY=${xkey}`) + insol = `jawab lah soal berikut dengan benar!, waktu 30 detik di mulai dari sekarang!\n\n${result.soal}` + injwb = `jawaban: ${result.jawaban}` + await reply(insol) + setTimeout( () => { + reply(injwb) + }, 30000) + setTimeout( () => { + reply(mess.hbis) + }, 20000) + } catch(e) { + reply('Status' + e) + } + break + case 'asahotak': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + try { + result = await fetchJson(`https://api.xteam.xyz/game/asahotak?APIKEY=${xkey}`) + innsl = `jawablah soal berikut dengan benar!, waktu 30 detik di mulai dari sekarang!\n\nLevel: ${result.result.level}\n\nSoal: ${result.result.soal}` + innjw = `jawaban: ${result.result.jawaban}` + await reply(innsl) + setTimeout( () => { + reply(innjw) + }, 30000) + setTimeout( () => { + reply(mess.hbis) + }, 20000) + } catch(e) { + reply('status ' + e) + } + break + + +//STICKER FEATURES + case 'ttp': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + if (!query) return await reply('Input Teks') + try { + await lol.replyWithSticker({ url: `https://api.xteam.xyz/ttp?file&text=${query}` }) + } catch(e) { + reply('Error '+ e) + } + break + case 'attp': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + if (!query) return await reply('Input Teks') + try { + await lol.replyWithSticker({ url: `https://api.xteam.xyz/attp?file&text=${query}` }) + } catch(e) { + reply('Status ' + e) + } + break + case 'smojigoogle': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + if (!query) return await reply('Input emoji!') + try { + stc = await fetchJson(`https://api.xteam.xyz/sticker/emojitopng?emo=${query}&APIKEY=${xkey}`) + stc2 = `${stc.hasil.apel.img}` + await lol.replyWithSticker({ url:`${stc2}` }) + } catch(e) { + reply('status ' + e) + } + break + +//REGISTRATION FEATURES + case 'unban': + if (!isOwner) return reply('Kamu Siapa?') + if (!query) return await reply('Input Id Yang Ingin Di Hapus Dari Database Bot!') + try { + let delban = _ban.indexOf(query) + _ban.splice(delban, 1) + fs.writeFileSync('./lib/banned.json', JSON.stringify(_ban)) + reply(`Succes delete Banned User ${query}`) + } catch (err) { + reply(`Gagal delete Banned User ${query}.\n\n${err}`) + } + break + case 'ban': + if (!query) return await reply('Input Username!') + if (!isOwner) return await reply('Kamu Siapa>\\<') + _ban.push(query) + fs.writeFileSync('./lib/banned.json', JSON.stringify(_ban)) + reply('donee') + break + case 'daftar': + try { + pp_user = await tele.getPhotoProfile(user.id) + } catch { + pp_user = 'https://telegra.ph/file/583ca5905d85b7484373b.jpg' + } + if (isUser) return await reply('Kamu Sudah Daftar Sebelumnya!') + _user.push(user.id) + fs.writeFileSync('./lib/user.json', JSON.stringify(_user)) + snn = Math.floor(Math.random() * 10000000) + caption = ` +Pendaftaran Sukses Dengan Detail Sebagai Berikut! + + +Id: ${user.id} +SN: ${snn} +Nama: ${full_name} +Bahasa: ${user.language_code} +Nama Awal: ${user.first_name} +Nama Akhir: ${user.last_name} +Nam Pengguna: ${user.username} + + +Note: + +Nama Pengguna Kamu Akan Hilang Dari Database Bot Apa Bila Bot Sedang Perbaikan Atau Kamu Melakukan ${prefix}unreg id telegram\n\nContoh: ${prefix}unreg 132563726` + console.log(user) + await lol.replyWithPhoto({ url:`https://hardianto-chan.herokuapp.com/api/tools/verification?nama=${user.username}&namaGb=${full_name}&pepeGb=https://telegra.ph/file/0023986d1241fc510e8eb.jpg&sn=${snn}&pepeUser=${pp_user}&bege=https://telegra.ph/file/833c102f481b7fc37ff1b.jpg&apikey=hardianto` }, { caption: caption, parse_mode: "Markdown" }) + break + case 'unreg': + if (!query) return await reply('Input Id Yang Ingin Di Hapus Dari Database Bot!') + try { + let delsayso = _user.indexOf(query) + _user.splice(delsayso, 1) + fs.writeFileSync('./lib/user.json', JSON.stringify(_user)) + reply(`Succes delete User ${query}`) + } catch (err) { + reply(`Gagal delete User ${query}.\n\n${err}`) + } + break + case 'status': + ppl = `status: ${isUser?'User':'Bukan User'}` + reply(ppl) + break + case 'getid': + await reply(`Id Mu: ${user.id}`) + break + case 'cek': + userrr = `Total User: ${_user.length}` + await reply(userrr) + break + case 'resetban': + if (!isOwner) return await reply('Lu Siapa?') + var bann = [] + _ban.splice(bann) + fs.writeFileSync('./lib/banned.json', JSON.stringify(_ban)) + reply('okee...') + break + case 'resetuser': + if (!isOwner) return await reply('Kamu Siapa?') + var serrr = [] + _user.splice(serrr) + fs.writeFileSync('./lib/user.json', JSON.stringify(_user)) + reply('oke') + break + case 'adduser': + if (!isOwner) return await reply('Kamu Siapa') + if (!query) return await reply('Input Id User') + _user.push(query) + fs.writeFileSync('./lib/user.json', JSON.stringify(_user)) + reply('Sukses') + break +//INFORMATION FEATURES + case 'stalkig': + case 'igstalk': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!query) return reply('Input Username!') + ig.fetchUser(`${args.join(' ')}`) + .then(Y => { + console.log(`${args.join(' ')}`) + ten = `${Y.profile_pic_url_hd}` + teks = `Id​ : ${Y.profile_id}\nUsername : ${args.join('')}\nFull Name : ${Y.full_name}\nBio : ${Y.biography}\nFollowers : ${Y.following}\nFollowing : ${Y.followers}\nPrivate : ${Y.is_private}\nVerified : ${Y.is_verified}\n\nLink : https://instagram.com/${args.join('')}` + lol.replyWithPhoto({ url: `${ten}` }, {caption: teks, pares_mode: "Markdown" }) + }) + .catch(e => { + reply('Status ' + e) + }) + break + case 'tiktokstalk': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!query) return reply('Input Username!') + reply('Sever Sedang Error!') + break + case 'twitstalk': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!query) return reply('Input Username!') + try { + + result = await fetchJson(`https://kocakz.herokuapp.com/api/media/stalktwitt?user=${query}`) + teks = ` +Fullname: ${result.fullname} +Username: ${result.username} +Following: ${result.following} +Dollowers: ${result.follower} +Description: ${result.descText} +Link Description: ${result.descUrl} +` + ppny = `${result.profile}` + await lol.replyWithPhoto({ url: `${ppny}` }, {caption: teks, parse_mode: "Markdown"}) + } catch(e) { + reply('' + e) + } + break + case 'covid': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!query) return reply('Input Nama Negara!') + try { + result = await fetchJson(`https://kocakz.herokuapp.com/api/edu/corona?country=${query}`) + txt = ` + negara: ${result.results.country} + aktif: ${result.results.active} + kasus: ${result.results.cases} + sembuh: ${result.results.recovered} + meninggal: ${result.results.deaths} + kasus hari ini: ${result.results.todayCases} + meninggal hari ini: ${result.results.todayDeaths} + ` + await reply(txt) + } catch(e) { + reply('' + e) + } + break + case 'infogempa': + if (!isUser) return reply(mes.ser) + if (isBann) return reply(mess.ban) + try { + ingfo = await fetchJson(`https://bryantestapi.herokuapp.com/api/infogempa?apikey=Alphabot`) + text = `Waktu: ${ingfo.result.Waktu}\n` + text += `Lintang: ${ingfo.result.Lintang}\n` + text += `Bujur: ${ingfo.result.Bujur}\n` + text += `Magnitudo: ${ingfo.result.Magnitudo}\n` + text += `Kedalaman: ${ingfo.result.Kedalaman}\n` + text += `Wilayah: ${ingfo.result.Wilayah}\n` + text += `Map: ${ingfo.result.Map}` + reply(text) + } catch(e) { + reply('' + e) + } + break + case 'cuacadunia': + if (!isUser) return reply(mes.ser) + if (isBann) return reply(mess.ban) + try { + result = await fetchJson(`https://bryantestapi.herokuapp.com/api/infocuaca/dunia?apikey=Alphabot`) + await lol.replyWithPhoto({ url:`${result.result.cuaca_dunia}` }) + } catch(e) { + reply('' + e) + } + break + case 'infocuacabandara': + if (!isUser) return rely(mess.ser) + if (isBann) return reply(mess.ban) + try { + result = await fetchJson(`https://bryantestapi.herokuapp.com/api/infocuaca/bandara?apikey=Alphabot`) + for (let x of result.result.daftar_bandara) { + text = `Nama Bandara: ${x.nama_bandara}\n` + text += `Waktu Pengamatan: ${x.waktu_pengamatan}\n` + text += `Arah Angin: ${x.arah_angin}\n` + text += `Kecepatan: ${x.kecepatan}\n` + text += `Jarak Pandang: ${x.jarak_pandang}\n` + text += `Cuaca: ${x.cuaca}\n` + text += `Suhu: ${x.suhu}\n` + text += `Titik Timbun: ${x.titik_timbun}\n` + text += `Tekanan Udara: ${x.tekanan_udara}` + } + await reply(text) + } catch(e) { + reply('' + e) + } + break + case 'infotsunami': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + try { + result = await fetchJson(`https://bryantestapi.herokuapp.com/api/infotsunami?apikey=Alphabot`) + for (let y of result.result.daftar_tsunami) { + teks = `Tanggal: ${y.tangal}\n` + teks += `Lokasi : ${y.lokasi}\n` + teks += `Magnitudo : ${y.magnitude}\n` + teks += `Kedalaman : ${y.kedalaman}\n` + teks += `Wilayah : ${y.wilayah}` + reply(teks) + } + } catch(e) { + reply('' + e) + } + break +//Group Features + case 'tagme': + reply(`${Telegraf.mention(user.id)}`) + break + case 'chatscount': + if (isBann) return await reply(mess.ban) + if (!isUser) return await reply(mess.ser) + test = await bot.telegram.getChatMembersCount(lol.message.chat.id) + reply(`Total Members in the Group ${lol.message.chat.title}: ${test}`) + break + case 'leave': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!isGroup) return reply(mess.gc) + try { + await bot.telegram.leaveChat(lol.message.chat.id) + } catch(e) { + reply('' + e) + } + break + case 'gcdesk': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!isGroup) return reply(mess.gc) + if (!query) return reply('Input Teks!') + const aa = '```' + try { + await bot.telegram.setChatDescription(lol.message.chat.id, query) + reply(`Deskripsi Group Berhasil Di Ubah Oleh ${user.username} Menjadi Deskripsi Yang Baru\n\n${aa}${query}${aa}`) + } catch(e) { + reply('' + e) + } + break + case 'gctitle': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!isGroup) return reply(mess.gc) + if (!query) return reply('Input Teks!') + try { + await bot.telegram.setChatTitle(lol.message.chat.id, query) + reply(`Nama Group Berhasil Di Ubah Oleh ${user.username} Menjadi Nama Yang Baru\n\n${hem}${query}${hem}`) + } catch(e) { + reply('' + e) + } + break + case 'mypict': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!isGroup) return reply(mess.gc) + try { + ppnya = await bot.telegram.getUserProfilePhotos(user.id) + await lol.replyWithPhoto({ url: ppnya }) + } catch(e) { + reply('' + e) + } + break + case 'infochat': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!isGroup) return reply(mess.gc) + try { + cha = await bot.telegram.getChat(lol.message.chat.id) + kntll = `${cha.permissions}` + teks = ` + INFO CHAT MU YANG DI PERBOLEHKAN DI GROUP INI! + + +Id Grup: ${cha.id} +Nama Grup: ${cha.title} +Deskripsi: ${cha.description} + +${hem}Dapat Mengirim Pesan:${hem} ${cha.permissions.can_send_messages} +${hem}Dapat Mengirim Pesan Media:${hem} ${cha.permissions.can_send_media_messages} +${hem}Dapat Mengirim Pesan Lain:${hem} ${cha.permissions.can_send_other_messages} +${hem}Dapat Menambah Halaman Web:${hem} ${cha.permissions.can_add_web_page_previews} +${hem}Dapat Melakukan Polling:${hem} ${cha.permissions.can_send_polls} +${hem}Dapat Mengubah Info Grup:${hem} ${cha.permissions.can_change_info} +${hem}Dapat Menambahkan Peserta:${hem} ${cha.permissions.can_invite_users} +${hem}Dapat Memberi Pin Pesan:${hem} ${cha.permissions.can_pin_messages} +` + + await reply(teks) + console.log(cha) + } catch(e) { + reply('' + e) + } + break + case 'gcpict': + if (isQuotedImage) { + url_file = await tele.getLink(file_id) + await bot.telegram.setChatPhoto(lol.message.chat.id, url_file) + } else { + reply('Tag Gambar Nya!') + } + break + case 'delpict': + try { + await bot.telegram.deleteChatPhoto(lol.message.chat.id) + } catch(e) { + reply('' + e) + } + break + case 'xnxxdl': + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mes.ban) + if (!query) return reply('Input Url') + try { + result = await fetchJson(`https://api-melodicxt-3.herokuapp.com/api/xnxx-downloader?url=${query}&apiKey=administrator`) + teks = `TITLE: ${hem}${result.result.result.judul}${hem}\nSIZE: ${result.result.result.size}\nDESC: ${hem}${result.result.result.desc}${hem}` + await lol.replyWithPhoto({ url: `${result.result.result.thumb}` }, {caption: teks, parse_mode: "Markdown" }) + reply('Media Sedang Di Unduh') + await lol.replyWithVideo({ url: `${result.result.result.vid}` }) + } catch(e) { + reply('' + e) + } + break + case 'xnxxsearch': + if (!isOwner) return reply('Kamu Siapa?') + if (!isUser) return reply(mess.ser) + if (isBann) return reply(mess.ban) + if (!query) return reply('Input Query') + try { + anu = await fetchJson(`https://bx-hunter.herokuapp.com/api/xnxxsearch?query=${query}&apikey=ikygans`) + for (let asu of anu.result) { + teks = '------------------------' + teks = asu[Math.floor(Math.random() * asu.length)]; + pkata = `Title: ${asu.title}\nInfo: ${asu.info}\nLink: ${asu.link}\n--------------------------` + reply(pkata) + } + } catch(e) { + reply('' + e) + } + break + + + default: if (!isGroup && !isCmd && !isMedia) { await lol.replyWithChatAction("typing") - simi = await fetchJson(`https://api.lolhuman.xyz/api/simi?apikey=${apikey}&text=${body}`) + simi = await fetchJson(`http://hardianto-chan.herokuapp.com/api/fun/simi?query=${body}&apikey=hardianto`) await reply(simi.result) } } - } catch (e) { + } catch (e) { console.log(chalk.whiteBright("├"), chalk.cyanBright("[ ERROR ]"), chalk.redBright(e)) } }) @@ -962,7 +1738,7 @@ bot.telegram.getMe().then((getme) => { console.log(chalk.greenBright(" │ + Platfrom : " + os.platform() || "")) console.log(chalk.greenBright(" │ + Prefix : " + itsPrefix)) console.log(chalk.greenBright(' ====================================================')) - console.log(chalk.whiteBright('╭─── [ LOG ]')) + console.log(chalk.whiteBright('╭─── [ BOT STARTED ]')) }) process.once('SIGINT', () => bot.stop('SIGINT')) -process.once('SIGTERM', () => bot.stop('SIGTERM')) \ No newline at end of file +process.once('SIGTERM', () => bot.stop('SIGTERM')) From fe289464aa6defb00b1597f0cf887d41005a8a51 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:07:58 +0700 Subject: [PATCH 10/18] Update Readme.md --- Readme.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 6ee4b09..e8fcd59 100644 --- a/Readme.md +++ b/Readme.md @@ -9,13 +9,16 @@ ## Cloning this repo ```cmd -> git clone https://github.com/LoL-Human/TelegramBot-NodeJS +> git clone https://github.com/BryanRfly/TelegramBot-NodeJS > cd TelegramBot-NodeJS ``` ## Install the package ```cmd > npm i +> npm i insta-fetcher +> npm i performance-now +> npm i moment-timezone ``` ## Edit config file @@ -24,6 +27,7 @@ Edit the required value in `config.json`. You can get the apikey at [`LoL Human { "usernameOwner": "BryanRfly", "apikey": "", + "xkey": "", "bot_token": "", "owner": "LoL Human", "ownerLink": "https://t.me/LoLHumen", @@ -38,9 +42,10 @@ Edit the required value in `config.json`. You can get the apikey at [`LoL Human ``` ## Note: -* You can request a case in my [`WhatsApp`](http://wa.me/62895418200111). +* You can request a case in my [`WhatsApp`](http://wa.me/6289649480997). # Thanks To * [`Telegraf`](https://github.com/telegraf/telegraf) +* [`LoL-Human`](https://github.com/LoL-Human) * [`Pais`](https://github.com/Paiiss) * `Ben` From 2ab4804b817dbaa7720c274b2a8d2861bdd6c360 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:09:04 +0700 Subject: [PATCH 11/18] Update Readme.md --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index e8fcd59..fd47e97 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -# LoL Human Telegram Bot +# Bryan Telegram Bot # Installation From fd0a9ce903d3c4181a98d9dadb2424f6443a650a Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:10:13 +0700 Subject: [PATCH 12/18] Update Readme.md --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index fd47e97..e8f8d49 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -# Bryan Telegram Bot +# Telegram Bot # Installation From e1fc7c39aee60f1c7a88db8569893bab837a625d Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:25:48 +0700 Subject: [PATCH 13/18] Update Readme.md --- Readme.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index e8f8d49..e99dc8a 100644 --- a/Readme.md +++ b/Readme.md @@ -2,8 +2,11 @@ # Installation -## Windows -* [`Download Node JS`](https://nodejs.org/en/download/) +## Platform +For Windows Install Additional Material Below +For Termux, you can directly clone For Termux, you can directly clone this repo and then install the package + +* [ `Unduh Node JS` ] ( https://nodejs.org/en/download/ ) * [`Download Git`](https://git-scm.com/download/win) From b43fafacd1026d5900c1c8d58c1afc106ebf2b29 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:28:52 +0700 Subject: [PATCH 14/18] Update Readme.md --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index e99dc8a..c6ac3e5 100644 --- a/Readme.md +++ b/Readme.md @@ -3,8 +3,8 @@ # Installation ## Platform -For Windows Install Additional Material Below -For Termux, you can directly clone For Termux, you can directly clone this repo and then install the package +# For Windows Install Additional Material Below. For Termux, just clone this repo and install it like the example below + * [ `Unduh Node JS` ] ( https://nodejs.org/en/download/ ) * [`Download Git`](https://git-scm.com/download/win) From bcf14776788dd7a28b5c5e65829e2c861abe187f Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:29:56 +0700 Subject: [PATCH 15/18] Update Readme.md --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index c6ac3e5..48565d2 100644 --- a/Readme.md +++ b/Readme.md @@ -2,8 +2,8 @@ # Installation -## Platform -# For Windows Install Additional Material Below. For Termux, just clone this repo and install it like the example below +# Platform +## For Windows Install Additional Material Below. For Termux, just clone this repo and install it like the example below * [ `Unduh Node JS` ] ( https://nodejs.org/en/download/ ) From 9d2aaf7909bfdc3e8f3d3a2d93a7b6867e636730 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 23:24:28 +0700 Subject: [PATCH 16/18] Update Readme.md --- Readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Readme.md b/Readme.md index 48565d2..8532fc5 100644 --- a/Readme.md +++ b/Readme.md @@ -44,6 +44,9 @@ Edit the required value in `config.json`. You can get the apikey at [`LoL Human > npm start ``` +# project +* [`BryanBot`](https://t.me/BryanRflyy) + ## Note: * You can request a case in my [`WhatsApp`](http://wa.me/6289649480997). From dc3454635a87e293239e385a50ec89bd0c965a37 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Sun, 20 Jun 2021 23:25:26 +0700 Subject: [PATCH 17/18] Update Readme.md --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 8532fc5..664cf7c 100644 --- a/Readme.md +++ b/Readme.md @@ -45,7 +45,7 @@ Edit the required value in `config.json`. You can get the apikey at [`LoL Human ``` # project -* [`BryanBot`](https://t.me/BryanRflyy) +* [`BryanBot`](https://t.me/BryanRafly_bot) ## Note: * You can request a case in my [`WhatsApp`](http://wa.me/6289649480997). From 96bc0a2f79255df73039e03d2c0178b7286ff6e5 Mon Sep 17 00:00:00 2001 From: Bryan Raflyansah <76269148+BryanRfly@users.noreply.github.com> Date: Mon, 21 Jun 2021 07:15:57 +0700 Subject: [PATCH 18/18] Update Readme.md --- Readme.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/Readme.md b/Readme.md index 664cf7c..fee8ccd 100644 --- a/Readme.md +++ b/Readme.md @@ -19,9 +19,6 @@ ## Install the package ```cmd > npm i -> npm i insta-fetcher -> npm i performance-now -> npm i moment-timezone ``` ## Edit config file