├── .gitignore ├── Dockerfile ├── LICENSE ├── Procfile ├── README.md ├── app.json ├── config.js ├── handler.js ├── index.js ├── lib ├── DB_Adapters │ ├── cloudDBAdapter.js │ ├── index.js │ └── mongoDB.js ├── aksara.js ├── canvas.js ├── clearSessions.js ├── clearTmp.js ├── connection.js ├── converter.js ├── database.js ├── func.js ├── gdrive.js ├── helper.js ├── import.js ├── levelling.js ├── logs.js ├── plugins.js ├── print.js ├── queque.js ├── sambungkata.js ├── scrape.js ├── simple.js ├── sticker.js ├── store.js ├── tictactoe.d.ts ├── tictactoe.js ├── ular_tangga.js ├── uploadFile.js ├── uploadImage.js ├── utils │ ├── features.js │ └── header.js ├── webp.js ├── webp2mp4.js ├── welcome.js ├── y2mate.js └── youtube-search │ ├── channel.js │ ├── index.js │ ├── shared.js │ └── video.js ├── main.js ├── media ├── anime.jpg ├── bank.jpg ├── editor.jpg ├── ephoto.jpg ├── gagal.jpg ├── genshin.jpg ├── nsfw.jpg ├── oxy.jpg ├── rule.jpg ├── sticker │ ├── bronya.webp │ └── notfound.webp ├── textpro.jpg ├── thumbnail.jpg ├── truth.jpg └── zero.jpg ├── package.json ├── plugins ├── _functionbefore │ ├── _afk.js │ ├── _allfake.js │ ├── _anti+212.js │ ├── _antilink.js │ ├── _antispam.js │ ├── _antisticker.js │ ├── _antitagsw.js │ ├── _antitoxic.js │ ├── _antiuncheck.js │ ├── _antiviewonce.js │ ├── _antivirus.js │ ├── _autodetect.js │ ├── _autolevelup.js │ ├── _autoreply.js │ ├── _checkpin.js │ ├── _cmdWithMedia.js │ ├── _expired.js │ ├── _expiredprem.js │ ├── _getmsg.js │ ├── _rvo.js │ ├── _templateResponse.js │ ├── _timermute.js │ ├── _timersilent.js │ └── _viewstatus.js ├── anime │ ├── neonime.js │ ├── randomstory.js │ ├── rannekos.js │ └── ranscrape.js ├── creator │ ├── attp.js │ ├── ephoto3.js │ ├── oxy1.js │ ├── sticker.js │ ├── stickertoimg.js │ ├── takestick.js │ ├── textpro3.js │ ├── textprobpink.js │ └── textprophub.js ├── download │ ├── cocofun.js │ ├── gdrive.js │ ├── gitclone.js │ ├── likee.js │ ├── likeenowm.js │ ├── pixiv.js │ ├── sharechat.js │ ├── smule.js │ ├── snackvideo.js │ ├── solidfile.js │ ├── soundcloud.js │ ├── spotify.js │ ├── yta.js │ ├── ytplay.js │ ├── yts.js │ ├── ytv.js │ └── ytv2.js ├── entertainment │ ├── asupantiktok.js │ ├── cecan.js │ ├── lolice.js │ ├── meme.js │ ├── quote.js │ ├── quotedilan.js │ ├── quoteimage.js │ ├── randomcar.js │ ├── randomduck.js │ ├── speedtest.js │ └── truthdare.js ├── game │ ├── akinator.js │ ├── akinator_ans.js │ ├── asahotak.js │ ├── asahotak_ans.js │ ├── caklontong.js │ ├── caklontong_ans.js │ ├── family100.js │ ├── family100_answer.js │ ├── math.js │ ├── math_answer.js │ ├── siapakahaku.js │ ├── siapakahaku_ans.js │ ├── susunkata.js │ ├── susunkata_ans.js │ ├── tebakbendera.js │ ├── tebakbendera_ans.js │ ├── tebakgambar.js │ ├── tebakgambar_ans.js │ ├── tebakkata.js │ ├── tebakkata_ans.js │ ├── tebaklirik.js │ ├── tebaklirik_ans.js │ ├── tebakprovinsi.js │ ├── tebakprovinsi_ans.js │ ├── tebaktebakan.js │ ├── tebaktebakan_ans.js │ ├── tictactoe.js │ ├── tictactoe_ans.js │ └── ulartangga.js ├── genshin │ ├── animal.js │ ├── area.js │ ├── food.js │ ├── namecard.js │ ├── nation.js │ ├── outfit.js │ └── potion.js ├── group │ ├── add.js │ ├── afk.js │ ├── autonsfw.js │ ├── creator.js │ ├── delete.js │ ├── delppgc.js │ ├── demote.js │ ├── diem.js │ ├── durasisewa.js │ ├── emulate.js │ ├── enable.js │ ├── ephemeral.js │ ├── fixmoney.js │ ├── getbio.js │ ├── getpp.js │ ├── getppgc.js │ ├── grouplist.js │ ├── info.js │ ├── kick.js │ ├── link.js │ ├── linkgcbot.js │ ├── listban.js │ ├── listprem.js │ ├── listspam.js │ ├── mute.js │ ├── pengumuman.js │ ├── poll.js │ ├── promote.js │ ├── setnamegc.js │ ├── setppgc.js │ ├── settings.js │ ├── setwelcomebye.js │ ├── speed.js │ ├── tagadmin.js │ ├── tagall.js │ ├── vote.js │ ├── votecek.js │ ├── votedel.js │ ├── votestart.js │ └── warn.js ├── info │ ├── brainly.js │ ├── carigrup.js │ ├── cekapi.js │ ├── chord.js │ ├── corona.js │ ├── detectface.js │ ├── gempa.js │ ├── get.js │ ├── growtopia.js │ ├── hoax.js │ ├── imdb.js │ ├── jadwaltvnow.js │ ├── lookup.js │ ├── nama.js │ ├── ocr.js │ ├── osu.js │ └── whois.js ├── menu │ ├── anime.js │ ├── download.js │ ├── editor.js │ ├── ephoto.js │ ├── fun.js │ ├── genshin.js │ ├── group.js │ ├── main.js │ ├── nsfw.js │ ├── owner.js │ ├── oxy.js │ └── textpro.js ├── nsfw │ └── xvideos.js ├── others │ ├── anonymous_chat.js │ ├── anonymous_chat_ans.js.js │ ├── cmddel.js │ ├── cmdlist.js │ ├── cmdlock.js │ ├── cmdset.js │ ├── jasadonasi.js │ ├── jasajadibot.js │ ├── jasasc.js │ ├── jasasewabot.js │ ├── jasatopup.js │ ├── keranghow.js │ ├── kerangkerangajaib.js │ ├── levelup.js │ ├── msgadd.js │ ├── msgdel.js │ ├── msglist.js │ ├── primbonjadian.js │ ├── primbonjodoh.js │ ├── primbonmimpi.js │ ├── primbonnama.js │ ├── primbonnomorhoki.js │ ├── primbonweton.js │ └── privcmd.js ├── owner │ ├── addgrupdurasi.js │ ├── addowner.js │ ├── addownerr.js │ ├── addprem.js │ ├── addpremdurasi.js │ ├── backup.js │ ├── banchat.js │ ├── banuser.js │ ├── broadcast.js │ ├── broadcastchat.js │ ├── broadcastgc.js │ ├── cash.js │ ├── cleandb.js │ ├── clearsessions.js │ ├── delowner.js │ ├── delownerr.js │ ├── delppbot.js │ ├── delprem.js │ ├── enable.js │ ├── exec.js │ ├── exec2.js │ ├── join.js │ ├── leavegc.js │ ├── menfessdel.js │ ├── openaikey.js │ ├── pluginget.js │ ├── pluginsave.js │ ├── priv.js │ ├── reset.js │ ├── resetuser.js │ ├── setapikey.js │ ├── setauthor.js │ ├── setgroupname.js │ ├── setlinkgc.js │ ├── setpackname.js │ ├── setppbot.js │ ├── setteks.js │ ├── setteks2.js │ ├── transfer.js │ ├── unbanchat.js │ ├── unbanuser.js │ └── viewstatus.js ├── rpg │ ├── adventure.js │ ├── bank.js │ ├── banknabung.js │ ├── banknarik.js │ ├── bansos.js │ ├── berburu.js │ ├── berdagang.js │ ├── berkebon.js │ ├── bet.js │ ├── buah.js │ ├── build.js │ ├── cook.js │ ├── craft.js │ ├── daily.js │ ├── heal.js │ ├── inventory.js │ ├── kandang.js │ ├── kolam.js │ ├── leaderboard.js │ ├── limit.js │ ├── mancing.js │ ├── monthly.js │ ├── open.js │ ├── profile.js │ ├── shop.js │ ├── transfer.js │ └── weekly.js ├── search │ ├── cekresi.js │ ├── drakor.js │ ├── google.js │ ├── googlereverse.js │ ├── kbbi.js │ ├── npm.js │ ├── pinterest.js │ ├── ppcouple.js │ ├── roboguru.js │ ├── semoji.js │ ├── stikerlol.js │ ├── unsplash.js │ └── yandexreverse.js └── tools │ ├── audioeffect.js │ ├── calculator.js │ ├── database.js │ ├── device.js │ ├── downloadsw.js │ ├── editmsg.js │ ├── emojimix.js │ ├── getexif.js │ ├── halah.js │ ├── hartatahta.js │ ├── inspect.js │ ├── nulis.js │ ├── readmore.js │ ├── readviewonce.js │ ├── shortlink.js │ ├── smeme.js │ ├── styletext.js │ ├── toaksara.js │ ├── tolatin.js │ ├── tomp3.js │ ├── tomp4.js │ ├── totalfitur.js │ ├── tourl.js │ └── tts.js ├── server.js ├── speed.py ├── src ├── Aesthetic │ ├── .file │ ├── Aesthetic_000.jpeg │ ├── Aesthetic_001.jpg │ └── Aesthetic_002.jpg ├── LICENSE ├── avatar_contact.png ├── font │ ├── .file │ ├── 212BabyGirl.otf │ ├── 212LeahleeSans.ttf │ ├── 99HandWritting.ttf │ ├── ACallingFontDby7NTypes.otf │ ├── ACasualHandwrittenPenNoncommercial.ttf │ ├── ADayinSeptember.otf │ ├── ASMelanieHandwritting.ttf │ ├── Alittlesunshine.ttf │ ├── And-This-Happened.ttf │ ├── AvenirCondensedHand.ttf │ ├── Avocados.ttf │ ├── BabyDoll.ttf │ ├── BattleOfKingsRegular.ttf │ ├── BrayNotes.ttf │ ├── Convered-By-Your-Grace.ttf │ ├── Edoms-Handwritting-Normal.ttf │ ├── Futura Bold Italic font.ttf │ ├── Futura Bold font.ttf │ ├── Futura Book Italic font.ttf │ ├── Futura Book font.ttf │ ├── Futura Extra Black font.ttf │ ├── Futura Heavy Italic font.ttf │ ├── Futura Heavy font.ttf │ ├── Futura Light Italic font.ttf │ ├── Futura Light font.ttf │ ├── Futura Medium Italic font.ttf │ ├── Futura XBlk BT.ttf │ ├── Futura-CondensedLight.otf │ ├── GloriaHallelujah-Regular.ttf │ ├── HandwritingCR-2.ttf │ ├── Kempton-Demo-Handwritting.ttf │ ├── MyHandsareHoldingYou.ttf │ ├── My_handwriting.ttf │ ├── Nadeznas-Handwritting.ttf │ ├── Roboto-Black.ttf │ ├── Roboto-BlackItalic.ttf │ ├── Roboto-Bold.ttf │ ├── Roboto-BoldItalic.ttf │ ├── Roboto-Italic.ttf │ ├── Roboto-Light.ttf │ ├── Roboto-LightItalic.ttf │ ├── Roboto-Medium.ttf │ ├── Roboto-MediumItalic.ttf │ ├── Roboto-Regular.ttf │ ├── Roboto-Thin.ttf │ ├── Roboto-ThinItalic.ttf │ ├── ShadowsIntoLight-Regular.ttf │ ├── Zahraaa.ttf │ ├── angelina.ttf │ ├── futur.ttf │ ├── futura light bt.ttf │ ├── futura medium bt.ttf │ ├── futura medium condensed bt.ttf │ ├── level_c.otf │ ├── michellehandwritting.ttf │ └── texts.otf ├── kertas │ ├── .file │ └── magernulis1.jpg ├── level_c.otf ├── lvlup_template.jpg ├── squidGame_GLRL.mp3 ├── squidGame_GLRL_Scan.mp3 ├── squidGame_GLRL_Shoot.mp3 ├── texts.otf └── welcome.svg ├── test.js ├── tmp └── .file └── views ├── img ├── dark │ ├── .file │ ├── balloon_centered_normal.9.png │ ├── balloon_centered_pressed.9.png │ ├── balloon_centered_shadow.9.png │ ├── balloon_incoming_frame.9.png │ ├── balloon_incoming_normal.9.png │ ├── balloon_incoming_normal_ext.9.png │ ├── balloon_incoming_normal_stkr.9.png │ ├── balloon_incoming_pressed.9.png │ ├── balloon_incoming_pressed_ext.9.png │ ├── balloon_live_location_incoming_frame.9.png │ ├── balloon_live_location_outgoing_frame.9.png │ ├── balloon_outgoing_frame.9.png │ ├── balloon_outgoing_normal.9.png │ ├── balloon_outgoing_normal_ext.9.png │ ├── balloon_outgoing_normal_stkr.9.png │ ├── balloon_outgoing_pressed.9.png │ └── balloon_outgoing_pressed_ext.9.png └── light │ ├── .file │ ├── balloon_centered_normal.9.png │ ├── balloon_centered_pressed.9.png │ ├── balloon_centered_shadow.9.png │ ├── balloon_incoming_frame.9.png │ ├── balloon_incoming_normal.9.png │ ├── balloon_incoming_normal_ext.9.png │ ├── balloon_incoming_normal_stkr.9.png │ ├── balloon_incoming_pressed.9.png │ ├── balloon_incoming_pressed_ext.9.png │ ├── balloon_live_location_incoming_frame.9.png │ ├── balloon_live_location_outgoing_frame.9.png │ ├── balloon_outgoing_frame.9.png │ ├── balloon_outgoing_normal.9.png │ ├── balloon_outgoing_normal_ext.9.png │ ├── balloon_outgoing_normal_stkr.9.png │ ├── balloon_outgoing_pressed.9.png │ └── balloon_outgoing_pressed_ext.9.png ├── index.html ├── index.js └── style.css /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | tmp/* 3 | 4 | # Dependency directories 5 | .git/ 6 | node_modules/ 7 | 8 | # data-single-auth 9 | session.data.json 10 | database.json 11 | package-lock.json 12 | 13 | #data-multi-auth 14 | eng.traineddata 15 | data.store.json 16 | sessions/ -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:lts-buster 2 | 3 | RUN apt-get update && \ 4 | apt-get install -y \ 5 | ffmpeg \ 6 | imagemagick \ 7 | webp && \ 8 | apt-get upgrade -y && \ 9 | rm -rf /var/lib/apt/lists/* 10 | 11 | COPY package.json . 12 | 13 | RUN npm install && npm install qrcode-terminal 14 | 15 | COPY . . 16 | 17 | EXPOSE 5000 18 | 19 | CMD ["node", "index.js"] 20 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node . --server 2 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "avalon-md", 3 | "description": "WhatsApp Bot Recoded by Zerenity", 4 | "repository": "https://github.com/clicknetcafe/avalon-md", 5 | "logo": "https://i.ibb.co/DR4vjVN/nother.jpg", 6 | "keywords": ["bot", "whatsapp", "whatsapp-bot", "rpg", "games-wabot", "epic rpg"] 7 | } 8 | -------------------------------------------------------------------------------- /lib/DB_Adapters/index.js: -------------------------------------------------------------------------------- 1 | import cloudDBAdapter from './cloudDBAdapter.js' 2 | import { mongoDB, mongoDBV2 } from './mongoDB.js' 3 | 4 | export { 5 | cloudDBAdapter, 6 | mongoDB, 7 | mongoDBV2 8 | } -------------------------------------------------------------------------------- /lib/clearSessions.js: -------------------------------------------------------------------------------- 1 | import Helper from './helper.js' 2 | import { promises as fs } from 'fs' 3 | import { tmpdir, platform } from 'os' 4 | import { join } from 'path' 5 | 6 | const TIME = 1000 * 60 * 120 // 120 menit 7 | 8 | const __dirname = Helper.__dirname(import.meta) 9 | 10 | export default async function clearSessions() { 11 | const ses = [tmpdir(), join(__dirname, '../sessions')] 12 | const filename = [] 13 | 14 | await Promise.allSettled(ses.map(async (dir) => { 15 | const files = await fs.readdir(dir) 16 | if (files.length > 3000) { 17 | for (const file of files) { 18 | if (file != 'creds.json') filename.push(join(dir, file)) 19 | } 20 | } 21 | })) 22 | 23 | return await Promise.allSettled(filename.map(async (file) => { 24 | const stat = await fs.stat(file) 25 | if (stat.isFile() && (Date.now() - stat.mtimeMs >= TIME)) { 26 | if (platform() === 'win32') { 27 | let fileHandle 28 | try { 29 | fileHandle = await fs.open(file, 'r+') 30 | } catch (e) { 31 | return e 32 | } finally { 33 | await fileHandle?.close() 34 | } 35 | } 36 | await fs.unlink(file) 37 | } 38 | })) 39 | } 40 | -------------------------------------------------------------------------------- /lib/levelling.js: -------------------------------------------------------------------------------- 1 | export const growth = Math.pow(Math.PI / Math.E, 1.618) * Math.E * .75 2 | 3 | export function xpRange(level, multiplier = global.multiplier || 1) { 4 | if (level < 0) 5 | throw new TypeError('level cannot be negative value') 6 | level = Math.floor(level) 7 | let min = level === 0 ? 0 : Math.round(Math.pow(level, growth) * multiplier) + 1 8 | let max = Math.round(Math.pow(++level, growth) * multiplier) 9 | return { 10 | min, 11 | max, 12 | xp: max - min 13 | } 14 | } 15 | 16 | export function findLevel(xp, multiplier = global.multiplier || 1) { 17 | if (xp === Infinity) 18 | return Infinity 19 | if (isNaN(xp)) 20 | return NaN 21 | if (xp <= 0) 22 | return -1 23 | let level = 0 24 | do 25 | level++ 26 | while (xpRange(level, multiplier).min <= xp) 27 | return --level 28 | } 29 | 30 | export function canLevelUp(level, xp, multiplier = global.multiplier || 1) { 31 | if (level < 0) 32 | return false 33 | if (xp === Infinity) 34 | return true 35 | if (isNaN(xp)) 36 | return false 37 | if (xp <= 0) 38 | return false 39 | return level < findLevel(xp, multiplier) 40 | } -------------------------------------------------------------------------------- /lib/logs.js: -------------------------------------------------------------------------------- 1 | let stdouts = [] 2 | export default (maxLength = 200) => { 3 | let oldWrite = process.stdout.write.bind(process.stdout) 4 | module.exports.disable = () => { 5 | module.exports.isModified = false 6 | return process.stdout.write = oldWrite 7 | } 8 | process.stdout.write = (chunk, encoding, callback) => { 9 | stdouts.push(Buffer.from(chunk, encoding)) 10 | oldWrite(chunk, encoding, callback) 11 | if (stdouts.length > maxLength) stdouts.shift() 12 | } 13 | module.exports.isModified = true 14 | return module.exports 15 | } 16 | 17 | export const isModified = false 18 | export function logs() { return Buffer.concat(stdouts)} 19 | 20 | -------------------------------------------------------------------------------- /lib/tictactoe.d.ts: -------------------------------------------------------------------------------- 1 | export declare class TicTacToe { 2 | /* X PlayerName */ 3 | playerX: string; 4 | /* Y PlayerName */ 5 | playerY: string; 6 | /* X if true, Y if false */ 7 | _currentTurn: boolean; 8 | _x: number; 9 | _y: number; 10 | _turns: number; 11 | constructor(playerX: string, playerY: string); 12 | get board(): number; 13 | turn(player, index: number): boolean; 14 | turn(player, x: number, y: number): boolean; 15 | } 16 | -------------------------------------------------------------------------------- /lib/uploadFile.js: -------------------------------------------------------------------------------- 1 | import { fileTypeFromBuffer } from 'file-type' 2 | import axios from 'axios' 3 | 4 | /** 5 | * Upload files to api.anonfiles.com 6 | * @param {Buffer} buffer Media Buffer 7 | * @return {Promise} 8 | */ 9 | export default async (buffer, json = false) => { 10 | const { ext, mime } = await fileTypeFromBuffer(buffer) 11 | let form = new FormData() 12 | let host, link, filesize, status = true 13 | const r = (Math.random() + 1).toString(36).substring(2) 14 | const blob = new Blob([buffer], { type: mime }) 15 | const filename = r+'.'+ext 16 | form.append(mime.includes('/') ? mime.split('/')[0] : 'file', blob, filename) 17 | try { 18 | let anu = await axios.post('https://api.anonfiles.com/upload', form, { 19 | headers: { 20 | //...form.getHeaders() 21 | } 22 | }) 23 | anu = anu.data.data 24 | host = 'https://api.anonfiles.com' 25 | link = anu.file.url.short 26 | filesize = anu.file.metadata.size.readable 27 | } catch (e) { 28 | console.log(e) 29 | status = false 30 | } 31 | if (!status) return false 32 | if (json) return { 33 | status: true, 34 | result: { 35 | host: host, 36 | filename: filename, 37 | mimetype: mime, 38 | filesize: filesize, 39 | url: link 40 | } 41 | } 42 | else return link 43 | } -------------------------------------------------------------------------------- /lib/youtube-search/channel.js: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { OwnerBadgeSchema, CollapsedTextSchema, CollapsedThumbnailClassSchema, CollapsedRunsClassSchema, TextSchema, CollapsedSimpleTextSchema } from './shared.js'; 3 | const BylineTextRunSchema = z.object({ 4 | text: z.string(), 5 | navigationEndpoint: z.object({ 6 | commandMetadata: z.object({ 7 | webCommandMetadata: z.object({ 8 | url: z.string() 9 | }) 10 | }), 11 | browseEndpoint: z.object({ 12 | canonicalBaseUrl: z.string() 13 | }) 14 | }) 15 | }); 16 | const BylineTextSchema = z.object({ 17 | runs: z.array(BylineTextRunSchema) 18 | }); 19 | export const ChannelRendererSchema = z.object({ 20 | channelId: z.string(), 21 | title: CollapsedTextSchema.partial(), 22 | // navigationEndpoint: RunNavigationEndpoint; 23 | thumbnail: CollapsedThumbnailClassSchema, 24 | descriptionSnippet: CollapsedRunsClassSchema, 25 | shortBylineText: BylineTextSchema, 26 | videoCountText: TextSchema, 27 | // subscriptionButton: SubscriptionButton; 28 | ownerBadges: z.array(OwnerBadgeSchema), 29 | subscriberCountText: CollapsedSimpleTextSchema, 30 | // subscribeButton: SubscribeButton; 31 | // trackingParams: string; 32 | longBylineText: BylineTextSchema, 33 | }); 34 | -------------------------------------------------------------------------------- /lib/youtube-search/shared.js: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | export const OwnerBadgeSchema = z.object({ 3 | metadataBadgeRenderer: z.object({ 4 | style: z.string(), 5 | tooltip: z.string() 6 | }) 7 | }); 8 | export const AccessibilitySchema = z.object({ 9 | accessibilityData: z.object({ 10 | label: z.string() 11 | }) 12 | }); 13 | export const CollapsedTextSchema = z.object({ 14 | text: z.string() 15 | }); 16 | export const CollapsedThumbnailClassSchema = z.object({ 17 | thumbnails: z.array(z.object({ 18 | url: z.string(), 19 | width: z.number(), 20 | height: z.number() 21 | })) 22 | }); 23 | export const CollapsedRunsClassSchema = z.object({ 24 | runs: z.array(CollapsedTextSchema) 25 | }); 26 | export const TextSchema = z.object({ 27 | accessibility: AccessibilitySchema, 28 | simpleText: z.string() 29 | }); 30 | export const CollapsedSimpleTextSchema = z.object({ 31 | simpleText: z.string() 32 | }); 33 | -------------------------------------------------------------------------------- /media/anime.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/anime.jpg -------------------------------------------------------------------------------- /media/bank.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/bank.jpg -------------------------------------------------------------------------------- /media/editor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/editor.jpg -------------------------------------------------------------------------------- /media/ephoto.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/ephoto.jpg -------------------------------------------------------------------------------- /media/gagal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/gagal.jpg -------------------------------------------------------------------------------- /media/genshin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/genshin.jpg -------------------------------------------------------------------------------- /media/nsfw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/nsfw.jpg -------------------------------------------------------------------------------- /media/oxy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/oxy.jpg -------------------------------------------------------------------------------- /media/rule.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/rule.jpg -------------------------------------------------------------------------------- /media/sticker/bronya.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/sticker/bronya.webp -------------------------------------------------------------------------------- /media/sticker/notfound.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/sticker/notfound.webp -------------------------------------------------------------------------------- /media/textpro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/textpro.jpg -------------------------------------------------------------------------------- /media/thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/thumbnail.jpg -------------------------------------------------------------------------------- /media/truth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/truth.jpg -------------------------------------------------------------------------------- /media/zero.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/media/zero.jpg -------------------------------------------------------------------------------- /plugins/_functionbefore/_afk.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | export async function before(m, { participants }) { 4 | if (!m.isGroup || m.isCommand) return !1 5 | if (m.fromMe) return !1 6 | if (db.data.chats[m.chat].isBanned) return !1 7 | let user = db.data.users[m.sender] 8 | if (user?.afk > 0) { 9 | this.reply(m.chat, `Kamu berhenti AFK${user.afkReason ? ` setelah ${user.afkReason}` : ''}\n Selama ${clockString(new Date - user.afk)}`, m) 10 | user.afk = -1 11 | user.afkReason = '' 12 | } 13 | let jids = [...new Set([...(m.mentionedJid || []), ...(m.quoted ? [m.quoted.sender] : [])])] 14 | for (let jid of jids) { 15 | let user = db.data.users[jid] 16 | if (!user?.afk) continue 17 | if (m.isBaileys) return !1 18 | if (user.afk > -1) this.reply(m.chat, `Jangan tag dia!\n Dia sedang AFK${user?.afkReason ? ` dengan alasan ${user.afkReason}` : ''}\n Selama ${clockString(new Date - user.afk)}`, m) 19 | } 20 | return !0 21 | } 22 | 23 | function clockString(ms) { 24 | let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000) 25 | let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60 26 | let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60 27 | return [h, m, s].map(v => v.toString().padStart(2, 0) ).join(':') 28 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_anti+212.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | export async function before(m, { isAdmin, isPrems, isBotAdmin }) { 4 | if (m.sender.startsWith('212') || m.sender.startsWith('265')) { 5 | try { 6 | db.data.users[m.sender].banned = true 7 | } catch (e) { 8 | console.log(e) 9 | } 10 | } 11 | return !0 12 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_antisticker.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | export async function before(m, { isAdmin, isBotAdmin }) { 4 | if (m.fromMe || !m.isGroup) return !1 5 | let chat = db.data.chats[m.chat] 6 | if (chat.antiSticker && m.mtype == "stickerMessage" && !isAdmin && isBotAdmin) 7 | await this.sendMsg(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: m.id, participant: m.sender } }) 8 | return !0 9 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_antitagsw.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { delay } from '../../lib/func.js' 3 | 4 | export async function before(m, { text, isBotAdmin }) { 5 | if (!m.isGroup || !isBotAdmin) return !1 6 | if (!db.data.chats[m.chat]?.antitagsw) return !1 7 | let tagcount = db.data.chats[m.chat].tagcount 8 | if (m.message?.groupStatusMentionMessage || 9 | m.message?.protocolMessage?.type === 25 || 10 | m.message?.protocolMessage?.type === 'STATUS_MENTION_MESSAGE' || 11 | m.mtype === 'groupStatusMentionMessage') { 12 | if (!tagcount[m.sender]) tagcount[m.sender] = 1 13 | else tagcount[m.sender] += 1 14 | await this.sendMsg(m.chat, { delete: { remoteJid: m.key.remoteJid, fromMe: false, id: m.key.id, participant: m.sender } }) 15 | if (tagcount[m.sender] >= 3) { 16 | delete tagcount[m.sender] 17 | await this.reply(m.chat, `@${(m.sender || '') 18 | .replace(/@s\.whatsapp\.net/g, '')} 3x mentions = kick`, fkontak, { mentions: [m.sender] }) 19 | await delay(3500) 20 | await this.groupParticipantsUpdate(m.chat, [m.sender], 'remove') 21 | } else await this.reply(m.chat, `@${(m.sender || '') 22 | .replace(/@s\.whatsapp\.net/g, '')} *warn (${tagcount[m.sender]}/3)*\njangan tag grup kalau gk mau di kick!`, fkontak, { mentions: [m.sender] }) 23 | } 24 | return !0 25 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_antitoxic.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let linkRegex = /(anj(k|g)|ajn?(g|k)|a?njin(g|k)|bajingan|b(a?n)?gsa?t|ko?nto?l|me?me?(k|q)|pe?pe?(k|q)|meki|titi(t|d)|pe?ler|tetek|toket|go?blo?(k|g)|to?lo?l|idiot|(k|ng)e?nto?(t|d)|jembut|bego|dajj?al|janc(u|o)k|pantek|puki ?(mak)?|kimak|kampang|lonte|col(i|mek?)|pelacur|henceu?t|nigga|fuck|dick|bitch|tits|bastard|asshole|blo?(k|g)|mmk|kntl|kontol|kontl|ajg|anjg|anjing|Bangsat|bngst|puki|kon|anj|ytm|yatm|ytim|taek|bacot|bct|bact|bcot|bngsat|ktl|ppk|fuck|suki)$/i 4 | 5 | export async function before(m, { isAdmin, isBotAdmin }) { 6 | if (m.fromMe || !m.isGroup) return !1 7 | let chat = db.data.chats[m.chat] 8 | let isGroupToxic = linkRegex.exec(m.text) 9 | if (chat.antiToxic && isGroupToxic && !isAdmin && isBotAdmin) 10 | await this.sendMsg(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: m.id, participant: m.sender } }) 11 | return !0 12 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_antiviewonce.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | export async function before(m) { 4 | if (!m.isGroup) return !1 5 | if (db.data.chats[m.chat].viewonce && m.message?.[m.mtype]?.viewOnce) { 6 | let buffer = await m.download() 7 | let i = `[ ANTIVIEWONCE AKTIF ]\n\n👾 *Sender* : @${m.sender.split`@`[0]}${m.text ? `\n\n*Caption :*\n${m.text}` : ''}` 8 | if (/audio/.test(m.mtype)) { 9 | let amsg = await this.sendMsg(m.chat, { audio: buffer, ptt: true }) 10 | await this.reply(m.chat, `[ ANTIVIEWONCE AUDIO ]\n\n👾 *Sender* : @${m.sender.split`@`[0]}`, amsg, { mentions: [m.sender] }) 11 | } else await this.sendFile(m.chat, buffer, '', i, null, false, { mentions: [m.sender, ...this.parseMention(i)], quoted: m }) 12 | } 13 | return !0 14 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_antivirus.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { delay } from '../../lib/func.js' 3 | 4 | export async function before(m, { isBotAdmin, isOwner }) { 5 | if (m.isBaileys || m.text.length < 45000 || isOwner) return !1 6 | if (m.isGroup) { 7 | if (!db.data.chats[m.chat].antivirus || !isBotAdmin) return !1 8 | await this.reply(m.chat, `@${m.sender.split('@')[0]} di-kick karena *dianggap* mengirim virtext !\n(${m.text.length} karakter teks)`, fkontak, { mentions: [m.sender] }) 9 | await this.sendMsg(m.chat, { delete: { remoteJid: m.chat, fromMe: false, id: m.id, participant: m.sender } }) 10 | await delay(3000) 11 | await this.groupParticipantsUpdate(m.chat, [m.sender], 'remove') 12 | } 13 | await this.updateBlockStatus(m.sender, 'block') 14 | return !0 15 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_checkpin.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | export async function before(m, { isAdmin, text, isBotAdmin }) { 4 | if (!m.isGroup) return !1 5 | let msg = m?.message?.pinInChatMessage 6 | if (msg) { 7 | let pin = db.data.chats[m.chat]?.pinmsg?.pinnedchat 8 | if (!pin) return !1 9 | if (!pin[msg.key.id]) pin[msg.key.id] = msg.key 10 | if (pin[msg.key.id] && msg.type == 2) delete pin[msg.key.id] 11 | } 12 | return !0 13 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_cmdWithMedia.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | const { 4 | proto, 5 | generateWAMessage, 6 | areJidsSameUser 7 | } = (await import('baileys')).default 8 | 9 | export async function all(m, chatUpdate) { 10 | if (m.isBaileys) return 11 | if (!m.message || !m.msg?.fileSha256) return 12 | if (!(Buffer.from(m.msg.fileSha256).toString('base64') in db.data.sticker)) return 13 | 14 | let hash = db.data.sticker[Buffer.from(m.msg.fileSha256).toString('base64')] 15 | let { text, mentionedJid } = hash 16 | let messages = await generateWAMessage(m.chat, { text: text, mentions: mentionedJid }, { 17 | userJid: this.user.id, 18 | quoted: m.quoted && m.quoted.fakeObj 19 | }) 20 | messages.key.fromMe = areJidsSameUser(m.sender, this.user.id || this.user.jid) 21 | messages.key.id = m.key.id 22 | messages.pushName = m.pushName 23 | if (m.isGroup) messages.participant = m.sender 24 | let msg = { 25 | ...chatUpdate, 26 | messages: [proto.WebMessageInfo.fromObject(messages)].map(this.serializeM), 27 | type: 'append' 28 | } 29 | this.ev.emit('messages.upsert', msg) 30 | } 31 | -------------------------------------------------------------------------------- /plugins/_functionbefore/_expired.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { delay } from '../../lib/func.js' 3 | 4 | export async function before(m) { 5 | if (!m.isGroup) return !1 6 | let chat = db.data.chats[m.chat] 7 | if (chat.expired == 0) return !1 8 | if (+new Date() > chat.expired) { 9 | await this.reply(m.chat, 'Durasi join bot telah habis.\nBye🖐 bot akan left!!') 10 | chat.expired = 0 11 | chat.joindate = 0 12 | chat.joincd = 0 13 | await delay(3000) 14 | await this.groupLeave(m.chat).catch(_ => console.log(_.message)) 15 | } 16 | return !0 17 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_expiredprem.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | export async function all(m) { 4 | let chats = db.data.users[m.sender] 5 | if (!chats?.expired) return !0 6 | if (+new Date() > chats.expired) { 7 | try { 8 | let prems = db.data.datas.prems 9 | await this.reply(m.chat, '[!] Durasi premium anda telah berakhir.', m, { mentions: [m.sender] }) 10 | chats.expired = null 11 | db.data.datas.prems = await prems.filter(v => v.user !== m.sender) 12 | } catch (e) { 13 | console.log(e) 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_getmsg.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | export async function all(m) { 4 | if (m.fromMe || m.key.remoteJid.endsWith('status@broadcast')) return !1 5 | if (m.isGroup && db.data.chats[m.chat]?.isBanned) return !1 6 | if (db.data.users[m.sender]?.banned) return !1 7 | if (m.isBaileys) return !1 8 | let msgs = db.data.msgs 9 | if (!(m.text in msgs)) return 10 | let _m = this.serializeM(JSON.parse(JSON.stringify(msgs[m.text]), (_, v) => { 11 | if ( 12 | v !== null && 13 | typeof v === 'object' && 14 | 'type' in v && 15 | v.type === 'Buffer' && 16 | 'data' in v && 17 | Array.isArray(v.data)) { 18 | return Buffer.from(v.data) 19 | } 20 | return v 21 | })) 22 | await _m.copyNForward(m.chat, true) 23 | } 24 | -------------------------------------------------------------------------------- /plugins/_functionbefore/_rvo.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | export async function before(m) { 4 | let rvo = db.data.datas.rvo 5 | let msg = m.message?.extendedTextMessage?.contextInfo?.quotedMessage?.viewOnceMessageV2?.message 6 | if (!msg) return !1 7 | let mtype = Object.keys(msg)[0] 8 | if (!msg[mtype].url) return !1 9 | let ms = msg[mtype] 10 | if (rvo.find(v => v?.url == ms.url)) return !1 11 | rvo.push({ url: ms.url, msg }) 12 | if (rvo.length > 100) db.data.datas.rvo.shift() 13 | return !0 14 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_timermute.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | const { proto } = await (await import('baileys')).default 3 | 4 | export async function before(m, { isAdmin, isBotAdmin }) { 5 | if (m.isGroup) { 6 | let chat = db.data.chats[m.chat] 7 | if (chat.permaBan || chat.mutecd == 0) return !1 8 | if (new Date - chat.lastmute <= chat.mutecd) return !1 9 | chat.lastmute = 0 10 | chat.mutecd = 0 11 | chat.isBanned = false 12 | await this.reply(m.chat, `Bot dapat digunakan kembali.`, fkontak) 13 | let pin = db.data.chats[m.chat].pinmsg 14 | if (pin['mutegc']) { 15 | await this.sendMsg(m.chat, { pin: pin['mutegc'], type: proto.PinInChat.Type['UNPIN_FOR_ALL'] }) 16 | delete pin['mutegc'] 17 | } 18 | } 19 | return !0 20 | } -------------------------------------------------------------------------------- /plugins/_functionbefore/_timersilent.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | export async function before(m, { isAdmin, isBotAdmin }) { 4 | let user = db.data.users[m.sender] 5 | if (!user) return !1 6 | if (user.permaban || user.bannedcd == 0) return !1 7 | if (new Date - user.lastbanned <= user.bannedcd) return !1 8 | user.lastbanned = 0 9 | user.bannedcd = 0 10 | user.banned = false 11 | await this.reply(m.chat, `@${(m.sender || '').replace(/@s\.whatsapp\.net/g, '')} udh gk di ban slur, jan spam lagi yak!`, fkontak, { mentions: [m.sender] }) 12 | return !0 13 | } -------------------------------------------------------------------------------- /plugins/anime/randomstory.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, command }) => { 2 | try { 3 | let anu = await (await fetch('https://raw.githubusercontent.com/ketchupmaze/AssistenYulaDB/refs/heads/main/anime/storyanime.json')).json() 4 | await conn.sendButton(m.chat, `_Random Story ${command.replace('story','')}_`, pauthor, anu.getRandom(), [[command, usedPrefix+command]], m) 5 | } catch (e) { 6 | console.log(e) 7 | m.reply(e.message || 'internal server error.') 8 | } 9 | } 10 | 11 | handler.menuanime = ['anime'].map(v => 'story'+v) 12 | handler.tagsanime = ['randommp4'] 13 | handler.command = /^(story(anime))$/i 14 | 15 | handler.premium = true 16 | handler.limit = true 17 | 18 | export default handler -------------------------------------------------------------------------------- /plugins/creator/attp.js: -------------------------------------------------------------------------------- 1 | import { createSticker } from 'wa-sticker-formatter' 2 | import fs from 'fs' 3 | 4 | let handler = async (m, { conn, args, text, usedPrefix, command }) => { 5 | text = text ? text : m.quoted?.text ? m.quoted.text : m.quoted?.caption ? m.quoted.caption : m.quoted?.description ? m.quoted.description : '' 6 | if (!text) throw `Example : ${usedPrefix + command} Lagi Ruwet` 7 | try { 8 | let men = await conn.parseMention(text) 9 | for (let x of men) { 10 | text = text.replace('@'+x.split('@')[0], await conn.getName(x)) 11 | } 12 | let stiker = await createSticker(`https://api.lolhuman.xyz/api/${command}?apikey=${api.lol}&text=${encodeURIComponent(text.substring(0, 151))}`, { pack: packname, author: author }) 13 | await conn.sendFile(m.chat, stiker, '', '', m) 14 | } catch (e) { 15 | console.log(e) 16 | await conn.sendFile(m.chat, fs.readFileSync(`./media/sticker/bronya.webp`), '', '', m) 17 | } 18 | } 19 | 20 | handler.help = ['ttp','ttp2','ttp3','ttp4','ttp5','ttp6','attp','attp2'] 21 | handler.tags = ['creator'] 22 | handler.command = /^((ttp(2|3|4|5|6)?)|(attp2?))$/i 23 | 24 | handler.limit = true 25 | 26 | export default handler -------------------------------------------------------------------------------- /plugins/creator/ephoto3.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text, usedPrefix, command }) => { 2 | if (!text || !text.includes('|')) throw `Usage : ${usedPrefix + command} text1|text2|text3\n\nExample: *${usedPrefix + command} Shiro|Neko*` 3 | let [l, r, s] = text.split`|` 4 | if (!l) throw `Input text1` 5 | if (!r) throw `Input text2` 6 | if (!s) throw `Input text3` 7 | try { 8 | let fimg = await fetch(`https://api.lolhuman.xyz/api/ephoto3/${command}?apikey=${api.lol}&text1=${encodeURIComponent(l)}&text2=${encodeURIComponent(r)}&text3=${encodeURIComponent(s)}`) 9 | if (!fimg.ok) throw new e() 10 | let fimgb = Buffer.from(await fimg.arrayBuffer()) 11 | await conn.sendMsg(m.chat, { image: fimgb, caption: `_Ephoto 360 : ${command}_` }, { quoted: m }) 12 | } catch (e) { 13 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 14 | } 15 | } 16 | 17 | handler.menuephoto = ['valorantbanner '] 18 | handler.tagsephoto = ['search'] 19 | handler.command = /^(valorantbanner)$/i 20 | 21 | handler.premium = true 22 | handler.limit = true 23 | 24 | export default handler -------------------------------------------------------------------------------- /plugins/creator/oxy1.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text, usedPrefix, command }) => { 2 | if (!text) throw `Example use *${usedPrefix + command} BunnyWalker*` 3 | try { 4 | let fimg = await fetch(`https://api.lolhuman.xyz/api/photooxy1/${command}?apikey=${api.lol}&text=${encodeURIComponent(text)}`) 5 | if (!fimg.ok) throw new e() 6 | let fimgb = Buffer.from(await fimg.arrayBuffer()) 7 | await conn.sendMsg(m.chat, { image: fimgb, caption: `_Photo Oxy : ${command}_` }, { quoted: m }) 8 | } catch (e) { 9 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 10 | } 11 | } 12 | 13 | handler.menuoxy = ['shadow','cup','cup1','romance','smoke','burnpaper','lovemessage','undergrass','love','coffe','woodheart','woodenboard','summer3d','wolfmetal','nature3d','underwater','golderrose','summernature','fallleaves','flamming','harrypotter','carvedwood'].map(v => v + ' ') 14 | handler.tagsoxy = ['search'] 15 | handler.command = /^(shadow|cup|cup1|romance|smoke|burnpaper|lovemessage|undergrass|love|coffe|woodheart|woodenboard|summer3d|wolfmetal|nature3d|underwater|golderrose|summernature|fallleaves|flamming|harrypotter|carvedwood)$/i 16 | 17 | handler.premium = true 18 | handler.limit = true 19 | 20 | export default handler -------------------------------------------------------------------------------- /plugins/creator/stickertoimg.js: -------------------------------------------------------------------------------- 1 | import { spawn } from 'child_process' 2 | import { format } from 'util' 3 | 4 | let handler = async (m, { conn, command, usedPrefix }) => { 5 | let q = m.quoted 6 | if (q && /sticker/.test(q.mtype)) { 7 | if (q.isAnimated) return m.reply(`Gunakan *${usedPrefix}tomp4* untuk stiker bergerak`) 8 | let img = await m.quoted.download() 9 | try { 10 | let bufs = [] 11 | const [_spawnprocess, ..._spawnargs] = [...(global.support.gm ? ['gm'] : global.support.magick ? ['magick'] : []), 'convert', 'webp:-', 'png:-'] 12 | let im = spawn(_spawnprocess, _spawnargs) 13 | im.on('error', e => m.reply(format(e))) 14 | im.stdout.on('data', chunk => bufs.push(chunk)) 15 | im.stdin.write(img) 16 | im.stdin.end() 17 | im.on('exit', async () => { 18 | await conn.sendFile(m.chat, Buffer.concat(bufs), 'image.png', '*DONE*', m) 19 | }) 20 | } catch (e) { 21 | console.log(e) 22 | await conn.sendMsg(m.chat, { image: img, jpegThumbnail: img, caption: '*DONE*' }, { quoted: m }) 23 | } 24 | } else return m.reply('Reply / tag Sticker') 25 | } 26 | 27 | handler.help = ['toimg'] 28 | handler.tags = ['tools'] 29 | handler.command = /^(toim(g|age))$/i 30 | 31 | export default handler -------------------------------------------------------------------------------- /plugins/creator/takestick.js: -------------------------------------------------------------------------------- 1 | import { addExif } from '../../lib/sticker.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!m.quoted) throw `Reply / Tag Stiker Sesuai Format :\n*${usedPrefix + command} |*` 5 | let stiker = false 6 | try { 7 | let [pack, aut] = text.split('|') 8 | pack = pack || '-' 9 | aut = aut || '-' 10 | let mime = m.quoted.mimetype || '' 11 | if (!/webp/.test(mime)) throw `Reply / Tag Stiker Sesuai Format :\n*${usedPrefix + command} |*` 12 | let img = await m.quoted.download() 13 | if (!img) throw `Reply / Tag Stiker Sesuai Format :\n*${usedPrefix + command} |*` 14 | stiker = await addExif(img, pack, aut) 15 | } catch (e) { 16 | console.error(e) 17 | if (Buffer.isBuffer(e)) stiker = e 18 | } finally { 19 | if (stiker) conn.sendFile(m.chat, stiker, '', '', m, false, { asSticker: true }) 20 | else throw 'Conversion failed' 21 | } 22 | } 23 | 24 | handler.help = ['takestick |'] 25 | handler.tags = ['creator'] 26 | handler.command = /^(((stic?ker)?wm(stic?ker)?)|(takestic?k(er)?)|colong)$/i 27 | 28 | handler.premium = true 29 | handler.limit = true 30 | 31 | export default handler 32 | -------------------------------------------------------------------------------- /plugins/creator/textprobpink.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text, usedPrefix, command }) => { 2 | if (!text) throw `Example : *${usedPrefix + command} BunnyWalker*` 3 | try { 4 | let fimg = await fetch(`https://api.lolhuman.xyz/api/textprome/blackpink?apikey=${api.lol}&text=${encodeURIComponent(text)}`) 5 | //if (!fimg.ok) throw 'Fitur Error' 6 | await conn.sendMsg(m.chat, { image: fimgb, caption: `_Text Pro : ${command}_` }, { quoted: m }) 7 | } catch (e) { 8 | console.log(e) 9 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 10 | } 11 | } 12 | 13 | handler.menutextpro = ['bpink '] 14 | handler.tagstextpro = ['search'] 15 | handler.command = /^(bpink)$/i 16 | 17 | handler.premium = true 18 | handler.limit = true 19 | 20 | export default handler -------------------------------------------------------------------------------- /plugins/creator/textprophub.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text, usedPrefix, command }) => { 2 | if (!text || !text.includes('|')) throw `Usage : ${usedPrefix + command} text1|text2\n\nExample: *${usedPrefix + command} Shiro|Neko*` 3 | let [l, r] = text.split`|` 4 | if (!l) throw `Input text1` 5 | if (!r) throw `Input text2` 6 | try { 7 | let fimg = await fetch(`https://api.lolhuman.xyz/api/textprome2/pornhub?apikey=${api.lol}&text1=${encodeURIComponent(l)}&text2=${encodeURIComponent(r)}`) 8 | //if (!fimg.ok) throw 'Fitur Error' 9 | let fimgb = Buffer.from(await fimg.arrayBuffer()) 10 | await conn.sendMsg(m.chat, { image: fimgb, caption: `_Text Pro : ${command}_` }, { quoted: m }) 11 | } catch (e) { 12 | console.log(e) 13 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 14 | } 15 | } 16 | 17 | handler.menutextpro = ['phub |'] 18 | handler.tagstextpro = ['search'] 19 | handler.command = /^(phub)$/i 20 | 21 | handler.premium = true 22 | handler.limit = true 23 | 24 | export default handler -------------------------------------------------------------------------------- /plugins/download/cocofun.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text, usedPrefix, command }) => { 2 | if (!text) throw `*Usage : ${usedPrefix + command} cocofun_url_video*\n\nExample :\n${usedPrefix + command} http://i.coco.fun/short/1513tui` 3 | if (!(text.includes('http://') || text.includes('https://'))) throw `url invalid, please input a valid url. Try with add http:// or https://` 4 | try { 5 | let anu = await fetch(`https://api.lolhuman.xyz/api/cocofun?apikey=${api.lol}&url=${text}`) 6 | let json = await anu.json() 7 | let txt = `*${json.result.title}*\n\nuploader : *${json.result.uploader}*\ntag : ${json.result.tag}\nviews : ${json.result.views}` 8 | await conn.sendMsg(m.chat, { video: { url: json.result[/funwm/.test(command) ? 'withwm' : 'nowm'] }, caption: txt }, { quoted: m }) 9 | } catch (e) { 10 | console.log(e) 11 | m.reply(`Invalid cocofun url.`) 12 | } 13 | } 14 | 15 | handler.menudownload = ['cocofun ','cocofunwm '] 16 | handler.tagsdownload = ['search'] 17 | handler.command = /^(cocofun((no)?wm)?)$/i 18 | 19 | handler.premium = true 20 | handler.limit = true 21 | 22 | export default handler -------------------------------------------------------------------------------- /plugins/download/gdrive.js: -------------------------------------------------------------------------------- 1 | import { someincludes } from '../../lib/func.js' 2 | import { GDriveDl } from '../../lib/scrape.js' 3 | 4 | let handler = async (m, { conn, args }) => { 5 | if (!(args[0] || '').match(/([\w-]){33}|([\w-]){19}/)) throw '[!] Input GoogleDrive URL' 6 | try { 7 | let anu = await GDriveDl(args[0]) 8 | if (anu.fileSize.slice(-2) == "GB") return m.reply(`Ngotak dong.\nMana bisa ngirim video ${anu.fileSize}`) 9 | if (!someincludes(['kB','KB'], anu.fileSize.slice(-2)) && parseInt(anu.fileSize) > 300) return m.reply(`Filesize: ${anu.fileSize}\nTidak dapat mengirim, maksimal file 300 MB`) 10 | let txt = `_*Downloading file, don't spam . . .*_\n\n` 11 | txt += `*filename :* ${anu.fileName}\n` 12 | txt += `*filesize :* ${anu.fileSize}\n` 13 | txt += `*mimetype :* ${anu.mimetype}` 14 | await m.reply(txt) 15 | await conn.sendMsg(m.chat, { document: { url: anu.downloadUrl }, fileName: anu.fileName, mimetype: anu.mimetype }, { quoted: m }) 16 | } catch (e) { 17 | console.log(e) 18 | throw 'Bot tidak memiliki akses ke GoogleDrive ini' 19 | } 20 | } 21 | 22 | handler.menudownload = ['gdrive '] 23 | handler.tagsdownload = ['search'] 24 | handler.command = /^(g?(oogle)?drive)$/i 25 | 26 | handler.premium = true 27 | handler.limit = true 28 | 29 | export default handler -------------------------------------------------------------------------------- /plugins/download/gitclone.js: -------------------------------------------------------------------------------- 1 | const regex = /(?:https|git)(?::\/\/|@)github\.com[\/:]([^\/:]+)\/(.+)/i 2 | 3 | let handler = async (m, { conn, args, usedPrefix, command }) => { 4 | if (!args[0]) throw `Example user ${usedPrefix}${command} https://github.com/clicknetcafe/avalon-md` 5 | if (!regex.test(args[0])) throw 'Invalid repositories!' 6 | try { 7 | let [_, user, repo] = (args[0] || '').match(regex) || [] 8 | repo = repo.replace(/.git$/, '') 9 | let url = `https://api.github.com/repos/${user}/${repo}/zipball` 10 | let filename = (await fetch(url, { method: 'HEAD' })).headers.get('content-disposition').match(/attachment; filename=(.*)/)[1] 11 | m.reply(`*_sending file, don't spam . . ._*`) 12 | await conn.sendMsg(m.chat, { document: { url: url }, mimetype: 'application/zip', fileName: filename.replace('.zip.zip','.zip')}, { quoted : m }) 13 | } catch (e) { 14 | console.log(e) 15 | m.reply(`[!] repositorie(s) not found.`) 16 | } 17 | } 18 | 19 | handler.menudownload = ['gitclone'] 20 | handler.tagsdownload = ['search'] 21 | handler.command = /^(gitclone)$/i 22 | 23 | handler.premium = true 24 | handler.limit = true 25 | 26 | export default handler -------------------------------------------------------------------------------- /plugins/download/likee.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text, usedPrefix, command }) => { 2 | if (!text) throw `*Usage : ${usedPrefix + command} likee_url_video*\n\nExample :\n${usedPrefix + command} https://likee.video/@vicky_marpaung/video/7006676628722311449` 3 | if (!(text.includes('http://') || text.includes('https://'))) throw `url invalid, please input a valid url. Try with add http:// or https://` 4 | try { 5 | let anu = await fetch(`https://rest-api.akuari.my.id/downloader/likeedl?link=${text}`) 6 | let json = await anu.json() 7 | let txt = `${json.hasil.title}` 8 | await conn.sendMsg(m.chat, { video: { url: json.hasil.watermark }, caption: json.hasil.title }, { quoted: m }) 9 | } catch (e) { 10 | console.log(e) 11 | m.reply(`Invalid likee url.`) 12 | } 13 | } 14 | 15 | handler.menudownload = ['likee '] 16 | handler.tagsdownload = ['search'] 17 | handler.command = /^(likee(wm)?)$/i 18 | 19 | handler.premium = true 20 | handler.limit = true 21 | 22 | export default handler -------------------------------------------------------------------------------- /plugins/download/likeenowm.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text, usedPrefix, command }) => { 2 | if (!text) throw `*Usage : ${usedPrefix + command} likee_url_video*\n\nExample :\n${usedPrefix + command} https://likee.video/@vicky_marpaung/video/7006676628722311449` 3 | if (!(text.includes('http://') || text.includes('https://'))) throw `url invalid, please input a valid url. Try with add http:// or https://` 4 | try { 5 | let anu = await fetch(`https://rest-api.akuari.my.id/downloader/likeedl?link=${text}`) 6 | let json = await anu.json() 7 | await conn.sendMsg(m.chat, { video: { url: json.hasil.no_watermark }, caption: json.hasil.title }, { quoted: m }) 8 | } catch (e) { 9 | console.log(e) 10 | m.reply(`Invalid likee url.`) 11 | } 12 | } 13 | 14 | handler.menudownload = ['likeenowm '] 15 | handler.tagsdownload = ['search'] 16 | handler.command = /^(likeenowm)$/i 17 | 18 | handler.premium = true 19 | handler.limit = true 20 | 21 | export default handler -------------------------------------------------------------------------------- /plugins/download/sharechat.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text, usedPrefix, command }) => { 2 | if (!text) return m.reply(`*Usage : ${usedPrefix + command} url*\n\nExample :\n${usedPrefix + command} https://sharechat.com/video/pDExqga`) 3 | if (!(text.includes('http://') || text.includes('https://'))) return m.reply(`url invalid, please input a valid url. Try with add http:// or https://`) 4 | if (!text.includes('sharechat.com')) return m.reply(`Invalid Sharechat URL.`) 5 | try { 6 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/sharechat?apikey=${api.lol}&url=${text}`)).json() 7 | if (anu.status != 200) throw Error(anu.message) 8 | anu = anu.result 9 | await conn.sendMsg(m.chat, { video: { url: anu.link_dl }, caption: anu.title }, { quoted: m }) 10 | } catch (e) { 11 | console.log(e) 12 | throw 'Internal server error.' 13 | } 14 | } 15 | 16 | handler.menudownload = ['sharechat '] 17 | handler.tagsdownload = ['search'] 18 | handler.command = /^(sharechat(dl)?)$/i 19 | 20 | handler.premium = true 21 | handler.limit = true 22 | 23 | export default handler -------------------------------------------------------------------------------- /plugins/download/smule.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text, usedPrefix, command }) => { 2 | if (!text) throw `*Usage : ${usedPrefix + command} smule_url_media*\n\nExample :\n${usedPrefix + command} https://www.smule.com/recording/lewis-capaldi-someone-you-loved/2027750707_2937753991` 3 | if (!(text.includes('http://') || text.includes('https://'))) throw `url invalid, please input a valid url. Try with add http:// or https://` 4 | try { 5 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/smule?apikey=${api.lol}&url=${text}`)).json() 6 | if (anu.status != 200) throw Error(anu.message) 7 | anu = anu.result 8 | if (/v/.test(command)) await conn.sendMsg(m.chat, { video: { url: anu.video }, caption: anu.title }, { quoted : m }) 9 | else await conn.sendFile(m.chat, anu.audio, `${anu.title}.mp3`, '', m, false, /mp3/.test(command) ? { asDocument: true } : {}) 10 | } catch (e) { 11 | console.log(e) 12 | throw 'invalid url / server down' 13 | } 14 | } 15 | 16 | handler.menudownload = ['smulemp3 ','smulevideo '] 17 | handler.tagsdownload = ['search'] 18 | handler.command = /^(smule(v(ideo)?|mp3|a(udio)?)?)$/i 19 | 20 | handler.premium = true 21 | handler.limit = true 22 | 23 | export default handler -------------------------------------------------------------------------------- /plugins/download/snackvideo.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn, text, usedPrefix, command }) => { 2 | if (!text) throw `*Usage : ${usedPrefix + command} smule_url_media*\n\nExample :\n${usedPrefix + command} https://sck.io/p/jiv-dwZX` 3 | if (!(text.includes('http://') || text.includes('https://'))) throw `url invalid, please input a valid url. Try with add http:// or https://` 4 | try { 5 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/snackvideo?apikey=${api.lol}&url=${text}`)).json() 6 | if (anu.status != 200) throw Error(anu.message) 7 | anu = anu.result 8 | await conn.sendMsg(m.chat, { video: { url: anu.url }, caption: anu.caption }, { quoted : m }) 9 | } catch (e) { 10 | console.log(e) 11 | throw 'invalid url / server down' 12 | } 13 | } 14 | 15 | handler.menudownload = ['snackvideo '] 16 | handler.tagsdownload = ['search'] 17 | handler.command = /^(snackvideo)$/i 18 | 19 | handler.premium = true 20 | handler.limit = true 21 | 22 | export default handler -------------------------------------------------------------------------------- /plugins/download/soundcloud.js: -------------------------------------------------------------------------------- 1 | import { soundcloud } from '../../lib/scrape.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `*Usage : ${usedPrefix + command} url*\n\nExample: ${usedPrefix + command} https://soundcloud.com/issabella-marchelina/sisa-rasa-mahalini-official-audio?utm_source=clipboard&utm_medium=text&utm_campaign=social_sharing` 5 | if (!(text.includes('http://') || text.includes('https://'))) throw `url invalid, please input a valid url. Try with add http:// or https://` 6 | try { 7 | let anu = await soundcloud(text) 8 | let txt = `*${anu.title}*\n\n` 9 | txt += `⭔ Duration : ${anu.duration}\n` 10 | txt += `⭔ Quality : *${anu.quality}*` 11 | if (anu.download != undefined) await conn.sendMsg(m.chat, { image: { url: anu.thumbnail }, caption: txt }, { quoted : m }) 12 | await conn.sendFile(m.chat, anu.download, `${anu.title}.mp3`, '', m, false, /mp3/.test(command) ? { asDocument: true } : {}) 13 | } catch (e) { 14 | console.log(e) 15 | m.reply(`Invalid Soundcloud URL / terjadi kesalahan.`) 16 | } 17 | } 18 | 19 | handler.menudownload = ['soundcloud '] 20 | handler.tagsdownload = ['search'] 21 | handler.command = /^(s(ound)?cloud(a(audio)?|mp3)?)$/i 22 | 23 | handler.premium = true 24 | handler.limit = true 25 | 26 | export default handler -------------------------------------------------------------------------------- /plugins/entertainment/lolice.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedprefix }) => { 2 | let who = m.quoted ? m.quoted.sender : m.mentionedJid?.[0] ? m.mentionedJid[0] : m.fromMe ? conn.user.jid : m.sender 3 | await conn.sendFile(m.chat, global.API('https://some-random-api.ml', '/canvas/lolice', { 4 | avatar: await conn.profilePictureUrl(who).catch(_ => 'https://telegra.ph/file/24fa902ead26340f3df2c.png'), 5 | }), '', `liuliuliuliuliu kami dengar disini ada lolicon`, m) 6 | } 7 | 8 | handler.help = ['lolice'] 9 | handler.tags = ['entertainment'] 10 | handler.command = /^(lolice)$/i 11 | 12 | handler.premium = true 13 | handler.limit = true 14 | 15 | export default handler -------------------------------------------------------------------------------- /plugins/entertainment/quote.js: -------------------------------------------------------------------------------- 1 | import { delay } from '../../lib/func.js' 2 | 3 | let handler = async (m, { conn, usedPrefix, command }) => { 4 | await delay(2000) 5 | try { 6 | let res = await fetch(`https://rest-api.akuari.my.id/randomtext/katabijak`) 7 | let json = await res.json() 8 | if (json.hasil.quotes == undefined) throw new(e) 9 | m.reply(`_${json.hasil.quotes}_\n\n*― ${json.hasil.author}*`) 10 | } catch (e) { 11 | try { 12 | let res = await fetch(`https://api.lolhuman.xyz/api/random/quotes?apikey=${api.lol}`) 13 | let json = await res.json() 14 | m.reply(`_${json.result.quote}_\n\n*― ${json.result.by}*`) 15 | } catch (e) { 16 | console.log(e) 17 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 18 | } 19 | } 20 | } 21 | 22 | handler.help = ['quote'] 23 | handler.tags = ['entertainment'] 24 | handler.command = /^(quotes?)$/i 25 | 26 | handler.premium = true 27 | handler.limit = true 28 | 29 | export default handler -------------------------------------------------------------------------------- /plugins/entertainment/quotedilan.js: -------------------------------------------------------------------------------- 1 | import { delay, pickRandom } from '../../lib/func.js' 2 | 3 | let handler = async (m, { conn, usedPrefix, command }) => { 4 | await delay(2000) 5 | try { 6 | let res = await fetch(`https://raw.githubusercontent.com/clicknetcafe/json-db/main/text/dilan.json`) 7 | let anu = pickRandom(await res.json()) 8 | m.reply(anu) 9 | } catch (e) { 10 | console.log(e) 11 | try { 12 | let res = await fetch(`https://api.lolhuman.xyz/api/quotes/dilan?apikey=${api.lol}`) 13 | let json = await res.json() 14 | if (json.status != '200') throw new e() 15 | m.reply(json.result) 16 | } catch (e) { 17 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 18 | } 19 | } 20 | } 21 | 22 | handler.help = ['quotedilan'] 23 | handler.tags = ['entertainment'] 24 | handler.command = /^((quotes?|kata)dilan)$/i 25 | 26 | handler.premium = true 27 | handler.limit = true 28 | 29 | export default handler -------------------------------------------------------------------------------- /plugins/entertainment/quoteimage.js: -------------------------------------------------------------------------------- 1 | import { delay } from '../../lib/func.js' 2 | 3 | let handler = async (m, { conn, usedPrefix, command }) => { 4 | await delay(2000) 5 | try { 6 | let fimg = await fetch(`https://api.lolhuman.xyz/api/random/quotesimage?apikey=${api.lol}`) 7 | let fimgb = Buffer.from(await fimg.arrayBuffer()) 8 | if (Buffer.byteLength(fimgb) < 22000) throw new e() 9 | await conn.sendFile(m.chat, fimgb, '', `_© Quote untuk Anda_`, m) 10 | } catch (e) { 11 | console.log(e) 12 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 13 | } 14 | } 15 | 16 | handler.help = ['quoteimage'] 17 | handler.tags = ['entertainment'] 18 | handler.command = /^(quotes?image)$/i 19 | 20 | handler.premium = true 21 | handler.limit = true 22 | 23 | export default handler -------------------------------------------------------------------------------- /plugins/entertainment/randomcar.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, command }) => { 2 | try { 3 | let res = await fetch(`https://api.popcat.xyz/car`) 4 | let json = await res.json() 5 | await conn.sendButton(m.chat, '_Random pic : car_\n'+json.title, pauthor, json.image, [[command, usedPrefix+command]], m) 6 | } catch (e) { 7 | console.log(e) 8 | m.reply(`Command ${command} sedang gangguan.`) 9 | } 10 | } 11 | 12 | handler.help = ['car'] 13 | handler.tags = ['entertainment'] 14 | handler.command = /^((random)?(car|mobil)(random)?)$/i 15 | 16 | handler.premium = true 17 | handler.limit = true 18 | 19 | export default handler -------------------------------------------------------------------------------- /plugins/entertainment/randomduck.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, command }) => { 2 | try { 3 | let anu = await (await fetch(`https://random-d.uk/api/random`)).json() 4 | await conn.sendButton(m.chat, `_Random pic : duck_`, pauthor, anu.url, [[command, usedPrefix+command]], m) 5 | } catch (e) { 6 | console.log(e) 7 | m.reply(`Command ${command} sedang gangguan.`) 8 | } 9 | } 10 | 11 | handler.help = ['duck'] 12 | handler.tags = ['entertainment'] 13 | handler.command = /^((random)?(duck|bebek)(random)?)$/i 14 | 15 | handler.premium = true 16 | handler.limit = true 17 | 18 | export default handler -------------------------------------------------------------------------------- /plugins/entertainment/speedtest.js: -------------------------------------------------------------------------------- 1 | import cp from 'child_process' 2 | import { promisify } from 'util' 3 | let exec = promisify(cp.exec).bind(cp) 4 | 5 | let handler = async (m, { conn }) => { 6 | await conn.sendMsg(m.chat, { react: { text: '⌛', key: m.key } }) 7 | let o 8 | try { 9 | o = await exec('py speed.py') // py / python / python3 10 | } catch (e) { 11 | o = e 12 | } finally { 13 | let { stdout, stderr } = o 14 | if (stdout.trim()) m.reply(stdout.replaceAll('..', '')) 15 | if (stderr.trim()) console.log(stderr) 16 | } 17 | } 18 | 19 | handler.help = ['speedtest'] 20 | handler.tags = ['entertainment'] 21 | handler.command = /^(speed(test?)?)$/i 22 | 23 | export default handler -------------------------------------------------------------------------------- /plugins/entertainment/truthdare.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, command }) => { 2 | try { 3 | let anu = await (await fetch(`https://raw.githubusercontent.com/BochilTeam/database/refs/heads/master/kata-kata/${/truth/.test(command) ? 'truth' : 'dare'}.json`)).json() 4 | m.reply(anu.getRandom()) 5 | } catch (e) { 6 | console.log(e) 7 | m.reply('try again') 8 | } 9 | } 10 | 11 | handler.help = ['truth','dare'] 12 | handler.tags = ['entertainment'] 13 | handler.command = /^(truth|dare)$/i 14 | 15 | handler.limit = true 16 | handler.group = true 17 | 18 | export default handler -------------------------------------------------------------------------------- /plugins/game/asahotak_ans.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import similarity from 'similarity' 3 | const threshold = 0.72 4 | 5 | export async function before(m) { 6 | let user = db.data.users[m.sender] 7 | if (!user || user.banned) return !1 8 | let id = m.chat 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text) 10 | return !0 11 | this.asahotak = this.asahotak ? this.asahotak : {} 12 | if (!(id in this.asahotak)) 13 | return 14 | if (m.quoted.id == this.asahotak[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.asahotak[id][1])) 16 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 17 | user.exp += this.asahotak[id][2] 18 | user.spamcount += 2 19 | this.reply(m.chat, `*Benar!* 🎉\n\n+${this.asahotak[id][2]} Exp`, m) 20 | clearTimeout(this.asahotak[id][3]) 21 | delete this.asahotak[id] 22 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) 23 | m.reply(`*Dikit Lagi!*`) 24 | else 25 | m.reply(`*Salah!*`) 26 | } 27 | return !0 28 | } 29 | 30 | export const exp = 0 -------------------------------------------------------------------------------- /plugins/game/caklontong_ans.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import similarity from 'similarity' 3 | const threshold = 0.72 4 | 5 | export async function before(m) { 6 | let user = db.data.users[m.sender] 7 | if (!user || user.banned) return !1 8 | let id = m.chat 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text) 10 | return !0 11 | this.caklontong = this.caklontong ? this.caklontong : {} 12 | if (!(id in this.caklontong)) 13 | return 14 | if (m.quoted.id == this.caklontong[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.caklontong[id][1])) 16 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 17 | user.exp += this.caklontong[id][2] 18 | user.spamcount += 2 19 | this.reply(m.chat, `*Benar!* 🎉\n${json.deskripsi}\n\n+${this.caklontong[id][2]} Exp`, m) 20 | clearTimeout(this.caklontong[id][3]) 21 | delete this.caklontong[id] 22 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) 23 | m.reply(`*Dikit Lagi!*`) 24 | else 25 | m.reply(`*Salah!*`) 26 | } 27 | return !0 28 | } 29 | 30 | export const exp = 0 -------------------------------------------------------------------------------- /plugins/game/math_answer.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = m => m 4 | handler.before = async function (m) { 5 | if (!/^-?[0-9]+(\.[0-9]+)?$/.test(m.text)) return !0 6 | let id = m.chat 7 | if (!m.quoted || !m.quoted.fromMe || !m.text || !/^Berapa hasil dari/i.test(m.quoted.text)) return !0 8 | this.math = this.math ? this.math : {} 9 | if (!(id in this.math)) return this.reply(m.chat, 'Soal itu telah berakhir', m) 10 | if (m.quoted.id == this.math[id][0].id) { 11 | let user = db.data.users[m.sender] 12 | let math = JSON.parse(JSON.stringify(this.math[id][1])) 13 | if (m.text == math.result) { 14 | user.money += math.bonus 15 | user.spamcount += 2 16 | clearTimeout(this.math[id][3]) 17 | delete this.math[id] 18 | this.reply(m.chat, `*Jawaban Benar!*\n+${math.bonus} Money`, m) 19 | } else { 20 | if (--this.math[id][2] == 0) { 21 | clearTimeout(this.math[id][3]) 22 | delete this.math[id] 23 | this.reply(m.chat, `*Kesempatan habis!*\nJawaban: *${math.result}*`, m) 24 | } else await m.reply(`*Jawaban Salah!*\nMasih ada ${this.math[id][2]} kesempatan`) 25 | } 26 | } 27 | return !0 28 | } 29 | 30 | export default handler -------------------------------------------------------------------------------- /plugins/game/siapakahaku_ans.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import similarity from 'similarity' 3 | const threshold = 0.72 4 | 5 | export async function before(m) { 6 | let user = db.data.users[m.sender] 7 | if (!user || user.banned) return !1 8 | let id = m.chat 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text) 10 | return !0 11 | this.siapakahaku = this.siapakahaku ? this.siapakahaku : {} 12 | if (!(id in this.siapakahaku)) 13 | return 14 | if (m.quoted.id == this.siapakahaku[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.siapakahaku[id][1])) 16 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 17 | user.money += this.siapakahaku[id][2] 18 | user.spamcount += 2 19 | this.reply(m.chat, `*Benar!* 🎉\n\n+${this.siapakahaku[id][2]} Money`, m) 20 | clearTimeout(this.siapakahaku[id][3]) 21 | delete this.siapakahaku[id] 22 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) 23 | m.reply(`*Dikit Lagi!*`) 24 | else 25 | m.reply(`*Salah!*`) 26 | } 27 | return !0 28 | } 29 | 30 | export const money = 0 -------------------------------------------------------------------------------- /plugins/game/susunkata_ans.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import similarity from 'similarity' 3 | const threshold = 0.72 4 | 5 | export async function before(m) { 6 | let user = db.data.users[m.sender] 7 | if (!user || user.banned) return !1 8 | let id = m.chat 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text) 10 | return !0 11 | this.susunkata = this.susunkata ? this.susunkata : {} 12 | if (!(id in this.susunkata)) 13 | return 14 | if (m.quoted.id == this.susunkata[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.susunkata[id][1])) 16 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 17 | user.money += this.susunkata[id][2] 18 | user.spamcount += 2 19 | this.reply(m.chat, `*Benar!* 🎉\n\n+${this.susunkata[id][2]} Money`, m) 20 | clearTimeout(this.susunkata[id][3]) 21 | delete this.susunkata[id] 22 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) 23 | m.reply(`*Dikit Lagi!*`) 24 | else 25 | m.reply(`*Salah!*`) 26 | } 27 | return !0 28 | } 29 | 30 | export const money = 0 -------------------------------------------------------------------------------- /plugins/game/tebakbendera_ans.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import similarity from 'similarity' 3 | const threshold = 0.72 4 | 5 | export async function before(m) { 6 | let user = db.data.users[m.sender] 7 | if (!user || user.banned) return !1 8 | let id = m.chat 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text) 10 | return !0 11 | this.tebakbendera = this.tebakbendera ? this.tebakbendera : {} 12 | if (!(id in this.tebakbendera)) 13 | return 14 | if (m.quoted.id == this.tebakbendera[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.tebakbendera[id][1])) 16 | if (m.text.toLowerCase() == json.nama.toLowerCase().trim()) { 17 | user.exp += this.tebakbendera[id][2] 18 | user.spamcount += 2 19 | this.reply(m.chat, `*Benar!* 🎉\n\n+${this.tebakbendera[id][2]} Exp`, m) 20 | clearTimeout(this.tebakbendera[id][3]) 21 | delete this.tebakbendera[id] 22 | } else if (similarity(m.text.toLowerCase(), json.nama.toLowerCase().trim()) >= threshold) 23 | m.reply(`*Dikit Lagi!*`) 24 | else 25 | m.reply(`*Salah!*`) 26 | } 27 | return !0 28 | } 29 | 30 | export const exp = 0 -------------------------------------------------------------------------------- /plugins/game/tebakgambar_ans.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import similarity from 'similarity' 3 | const threshold = 0.72 4 | 5 | export async function before(m) { 6 | let user = db.data.users[m.sender] 7 | if (!user || user.banned) return !1 8 | let id = m.chat 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text) 10 | return !0 11 | this.tebakgambar = this.tebakgambar ? this.tebakgambar : {} 12 | if (!(id in this.tebakgambar)) 13 | return 14 | if (m.quoted.id == this.tebakgambar[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.tebakgambar[id][1])) 16 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 17 | user.money += this.tebakgambar[id][2] 18 | user.spamcount += 2 19 | this.reply(m.chat, `*Benar!* 🎉\n\n+${this.tebakgambar[id][2]} Money`, m) 20 | clearTimeout(this.tebakgambar[id][3]) 21 | delete this.tebakgambar[id] 22 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) 23 | m.reply(`*Dikit Lagi!*`) 24 | else 25 | m.reply(`*Salah!*`) 26 | } 27 | return !0 28 | } 29 | 30 | export const money = 0 -------------------------------------------------------------------------------- /plugins/game/tebakkata_ans.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import similarity from 'similarity' 3 | const threshold = 0.72 4 | 5 | export async function before(m) { 6 | let user = db.data.users[m.sender] 7 | if (!user || user.banned) return !1 8 | let id = m.chat 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text) 10 | return !0 11 | this.tebakkata = this.tebakkata ? this.tebakkata : {} 12 | if (!(id in this.tebakkata)) 13 | return 14 | if (m.quoted.id == this.tebakkata[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.tebakkata[id][1])) 16 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 17 | user.money += this.tebakkata[id][2] 18 | user.spamcount += 2 19 | this.reply(m.chat, `*Benar!* 🎉\n\n+${this.tebakkata[id][2]} Money`, m) 20 | clearTimeout(this.tebakkata[id][3]) 21 | delete this.tebakkata[id] 22 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) 23 | m.reply(`*Dikit Lagi!*`) 24 | else 25 | m.reply(`*Salah!*`) 26 | } 27 | return !0 28 | } 29 | 30 | export const money = 0 -------------------------------------------------------------------------------- /plugins/game/tebaklirik_ans.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import similarity from 'similarity' 3 | const threshold = 0.72 4 | 5 | export async function before(m) { 6 | let user = db.data.users[m.sender] 7 | if (!user || user.banned) return !1 8 | let id = m.chat 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text) 10 | return !0 11 | this.tebaklirik = this.tebaklirik ? this.tebaklirik : {} 12 | if (!(id in this.tebaklirik)) 13 | return 14 | if (m.quoted.id == this.tebaklirik[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.tebaklirik[id][1])) 16 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 17 | user.exp += this.tebaklirik[id][2] 18 | user.spamcount += 2 19 | this.reply(m.chat, `*Benar!* 🎉\n\n+${this.tebaklirik[id][2]} Exp`, m) 20 | clearTimeout(this.tebaklirik[id][3]) 21 | delete this.tebaklirik[id] 22 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) 23 | m.reply(`*Dikit Lagi!*`) 24 | else 25 | m.reply(`*Salah!*`) 26 | } 27 | return !0 28 | } 29 | 30 | export const exp = 0 -------------------------------------------------------------------------------- /plugins/game/tebakprovinsi_ans.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import similarity from 'similarity' 3 | const threshold = 0.72 4 | 5 | export async function before(m) { 6 | let user = db.data.users[m.sender] 7 | if (!user || user.banned) return !1 8 | let id = m.chat 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text) 10 | return !0 11 | this.tebakprovinsi = this.tebakprovinsi ? this.tebakprovinsi : {} 12 | if (!(id in this.tebakprovinsi)) 13 | return 14 | if (m.quoted.id == this.tebakprovinsi[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.tebakprovinsi[id][1])) 16 | if (m.text.toLowerCase() == json.result.title.toLowerCase().trim()) { 17 | user.exp += this.tebakprovinsi[id][2] 18 | user.spamcount += 2 19 | this.reply(m.chat, `*Benar!* 🎉\n\n+${this.tebakprovinsi[id][2]} Exp`, m) 20 | clearTimeout(this.tebakprovinsi[id][3]) 21 | delete this.tebakprovinsi[id] 22 | } else if (similarity(m.text.toLowerCase(), json.result.title.toLowerCase().trim()) >= threshold) 23 | m.reply(`*Dikit Lagi!*`) 24 | else 25 | m.reply(`*Salah!*`) 26 | } 27 | return !0 28 | } 29 | 30 | export const exp = 0 -------------------------------------------------------------------------------- /plugins/game/tebaktebakan_ans.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import similarity from 'similarity' 3 | const threshold = 0.72 4 | 5 | export async function before(m) { 6 | let user = db.data.users[m.sender] 7 | if (!user || user.banned) return !1 8 | let id = m.chat 9 | if (!m.quoted || !m.quoted.fromMe || !m.quoted.isBaileys || !m.text) 10 | return !0 11 | this.tebaktebakan = this.tebaktebakan ? this.tebaktebakan : {} 12 | if (!(id in this.tebaktebakan)) 13 | return 14 | if (m.quoted.id == this.tebaktebakan[id][0].id) { 15 | let json = JSON.parse(JSON.stringify(this.tebaktebakan[id][1])) 16 | if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { 17 | user.money += this.tebaktebakan[id][2] 18 | user.spamcount += 2 19 | this.reply(m.chat, `*Benar!* 🎉\n\n+${this.tebaktebakan[id][2]} Money`, m) 20 | clearTimeout(this.tebaktebakan[id][3]) 21 | delete this.tebaktebakan[id] 22 | } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) 23 | m.reply(`*Dikit Lagi!*`) 24 | else 25 | m.reply(`*Salah!*`) 26 | } 27 | return !0 28 | } 29 | 30 | export const money = 0 -------------------------------------------------------------------------------- /plugins/genshin/animal.js: -------------------------------------------------------------------------------- 1 | import genshindb from 'genshin-db' 2 | 3 | let handler = async (m, { conn, text, args, usedPrefix, command }) => { 4 | if (!text) throw `Example : *${usedPrefix + command} shiba*` 5 | try { 6 | let anu = await genshindb.animals(text) 7 | let txt = `*Found : ${anu.name}*\n\n` 8 | txt += `"${anu.description}"\n\n` 9 | txt += `*Category :* ${anu.category}\n` 10 | txt += `*Count Type :* ${anu.counttype}\n` 11 | txt += `_sort order : ${anu.sortorder}_` 12 | m.reply(txt) 13 | } catch (e) { 14 | console.log(e) 15 | try { 16 | let anu2 = await genshindb.animals(`${text}`, { matchCategories: true }) 17 | m.reply(`*List ${text} categories :*\n\n- ` + anu2.toString().replaceAll(',','\n- ')) 18 | } catch (e) { 19 | console.log(e) 20 | let anu2 = await genshindb.animals(`names`, { matchCategories: true }) 21 | m.reply(`*Not Found*\n\n*Available animals is :*\n${anu2.join(", ")}`) 22 | } 23 | } 24 | } 25 | 26 | handler.menugenshin = ['gianimal '] 27 | handler.tagsgenshin = ['search'] 28 | handler.command = /^((gi|genshin)animals?)$/i 29 | 30 | handler.limit = true 31 | 32 | export default handler 33 | 34 | const more = String.fromCharCode(8206) 35 | const readMore = more.repeat(4001) -------------------------------------------------------------------------------- /plugins/genshin/area.js: -------------------------------------------------------------------------------- 1 | import genshindb from 'genshin-db' 2 | 3 | let handler = async (m, { conn, text, args, usedPrefix, command }) => { 4 | if (!text) throw `Example : *${usedPrefix + command} library*` 5 | try { 6 | let anu = await genshindb.geographies(text) 7 | let txt = `*Found : ${anu.name}*\n\n` 8 | txt += `_"${anu.description}"_\n\n` 9 | txt += `*Area :* ${anu.area}\n` 10 | txt += `*Region :* ${anu.region}\n` 11 | txt += `_sort order : ${anu.sortorder}_` 12 | m.reply(txt) 13 | } catch (e) { 14 | console.log(e) 15 | let anu2 = await genshindb.geographies(`names`, { matchCategories: true }) 16 | m.reply(`*Not Found*\n\n*Available geographies is :*\n${anu2.join(", ")}`) 17 | } 18 | } 19 | 20 | handler.menugenshin = ['giarea '] 21 | handler.tagsgenshin = ['search'] 22 | handler.command = /^((gi|genshin)(areas?|geogra(fi|ph(y|ies?))))$/i 23 | 24 | handler.limit = true 25 | 26 | export default handler 27 | 28 | const more = String.fromCharCode(8206) 29 | const readMore = more.repeat(4001) -------------------------------------------------------------------------------- /plugins/genshin/namecard.js: -------------------------------------------------------------------------------- 1 | import genshindb from 'genshin-db' 2 | 3 | let handler = async (m, { conn, text, args, usedPrefix, command }) => { 4 | if (!text) throw `Example : *${usedPrefix + command} klee*` 5 | try { 6 | let anu = await genshindb.namecards(text) 7 | let txt = `*${anu.name}*\n\n` 8 | txt += `*[ ${anu.description.replace('\n',' ]*\n_"')}"_\n\n` 9 | txt += `${anu.source ? `*Source :* ${anu.source.toString().replaceAll(',',', ')}` : ''}` 10 | m.reply(txt) 11 | } catch (e) { 12 | console.log(e) 13 | let anu2 = await genshindb.namecards(`names`, { matchCategories: true }) 14 | m.reply(`*Not Found*\n\n*Available namecards is :*\n${anu2.join(", ")}`) 15 | } 16 | } 17 | 18 | handler.menugenshin = ['ginamecard '] 19 | handler.tagsgenshin = ['search'] 20 | handler.command = /^((gi|genshin)(name)?cards?)$/i 21 | 22 | handler.limit = true 23 | 24 | export default handler 25 | 26 | const more = String.fromCharCode(8206) 27 | const readMore = more.repeat(4001) -------------------------------------------------------------------------------- /plugins/genshin/nation.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, usedPrefix, command }) => { 2 | if (!text) throw `Example : ${usedPrefix + command} liyue` 3 | try { 4 | let json = await (await fetch(`https://genshin.jmp.blue/nations/${text}`)).json() 5 | let json2 = await(await fetch(`https://genshin.jmp.blue/nations`)).json() 6 | if (json.name) { 7 | let txt = `*Name : ${json.name}*\n\n` 8 | txt += `*Element :* ${json.element}\n` 9 | txt += `*Archon :* ${json.element}\n` 10 | txt += `*ControllingEntity : ${json.controllingEntity}*` 11 | await m.reply(txt) 12 | } else { 13 | let txt = `*Not Found*\n\n*Available nations is :*\n${json2.join(", ")}` 14 | m.reply(txt) 15 | } 16 | } catch (e) { 17 | console.log(e) 18 | m.reply(e.message) 19 | } 20 | } 21 | 22 | handler.menugenshin = ['gination '] 23 | handler.tagsgenshin = ['search'] 24 | handler.command = /^((gi|genshin)nations?)$/i 25 | 26 | handler.limit = true 27 | 28 | export default handler -------------------------------------------------------------------------------- /plugins/genshin/outfit.js: -------------------------------------------------------------------------------- 1 | import genshindb from 'genshin-db' 2 | 3 | let handler = async (m, { conn, text, args, usedPrefix, command }) => { 4 | if (!text) throw `Example : *${usedPrefix + command} outrider*` 5 | try { 6 | let anu = await genshindb.outfits(text) 7 | let txt = `*Found : ${anu.name}*\n\n` 8 | txt += `_"${anu.description}"_\n\n` 9 | txt += `*Character :* ${anu.character}` 10 | txt += `${anu.url.modelviewer ? `\n_${anu.url.modelviewer}_` : ''}` 11 | m.reply(txt) 12 | } catch (e) { 13 | console.log(e) 14 | try { 15 | let anu2 = await genshindb.outfits(`${text}`, { matchCategories: true }) 16 | m.reply(`*List ${text} outfit :*\n\n- ` + anu2.toString().replaceAll(',','\n- ')) 17 | } catch (e) { 18 | console.log(e) 19 | let anu2 = await genshindb.outfits(`names`, { matchCategories: true }) 20 | m.reply(`*Not Found*\n\n*Available outfits is :*\n${anu2.join(", ")}`) 21 | } 22 | } 23 | } 24 | 25 | handler.menugenshin = ['gioutfit '] 26 | handler.tagsgenshin = ['search'] 27 | handler.command = /^((gi|genshin)(costumes?|outfits?))$/i 28 | 29 | handler.limit = true 30 | 31 | export default handler 32 | 33 | const more = String.fromCharCode(8206) 34 | const readMore = more.repeat(4001) -------------------------------------------------------------------------------- /plugins/genshin/potion.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, args, usedPrefix, command }) => { 2 | if (!text) throw `Example : ${usedPrefix + command} insulation potion` 3 | try { 4 | text = text.replace(/ /g, '-') 5 | let anu = await (await fetch(`https://genshin.jmp.blue/consumables/potions`)).json() 6 | if (anu[text]) { 7 | anu = anu[text] 8 | let txt = `*Name : ${anu.name}*\n\n` 9 | + `Rarity : ${anu.rarity}\n` 10 | + `Effect : ${anu.effect}\n\n` 11 | + `*Crafting :*` 12 | for (var x of anu.crafting) { 13 | txt += `\nItem : ${x.item}\n` 14 | + `Quantity : ${x.quantity}\n` 15 | + `──────────\n` 16 | } 17 | await m.reply(txt) 18 | } else { 19 | let bruh = Object.keys(anu) 20 | let txt = `*Not Found*\n\n*Available potions is :*\n${bruh.join(', ').replace(/-/g, ' ')}` 21 | m.reply(txt) 22 | } 23 | } catch (e) { 24 | console.log(e) 25 | m.reply(e.message) 26 | } 27 | } 28 | 29 | handler.menugenshin = ['gipotion '] 30 | handler.tagsgenshin = ['search'] 31 | handler.command = /^(gipotions?)$/i 32 | 33 | handler.limit = true 34 | 35 | export default handler -------------------------------------------------------------------------------- /plugins/group/creator.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, command, usedPrefix}) => { 4 | let data = [...db.data.datas.rowner.filter(([id, isCreator]) => id && isCreator), ...db.data.datas.owner.filter(([id, isCreator]) => id && isCreator)] 5 | if (data.length == 0) throw `*[ ! ] Real Owner belum di set.*\n\n*${usedPrefix}addrealowner* untuk menambahkan Owner Asli.\n\n*${usedPrefix}addowner* untuk menambahkan Owner Biasa.` 6 | let arr = [] 7 | for (let x of data) { 8 | let bus = await conn.getBusinessProfile(x[0]+'@s.whatsapp.net') || {} 9 | if (bus.wid) { 10 | arr.push(x[0]) 11 | const vcard = `BEGIN:VCARD\nVERSION:3.0\nN:;${x[1]};;;\nFN:${x[1]}\nTEL;type=Mobile;waid=${x[0]}:${x[0]}\nX-WA-BIZ-DESCRIPTION:${bus.description}\nX-WA-BIZ-NAME:${x[1]}\nEND:VCARD` 12 | await conn.sendMsg(m.chat, { contacts: { displayName: x[1], contacts: [{ vcard }] } }, { quoted: m }) 13 | } 14 | } 15 | data = data.filter(v => !arr.includes(v[0])) 16 | if (data.length > 0) await conn.sendContact(m.chat, data.map(([id, name]) => [id, name]), m) 17 | } 18 | 19 | handler.menugroup = ['owner'] 20 | handler.tagsgroup = ['group'] 21 | handler.command = /^(owner|creator)$/i 22 | 23 | export default handler -------------------------------------------------------------------------------- /plugins/group/delete.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, isAdmin, isBotAdmin }) => { 2 | if (!m.quoted) return 3 | let { chat, fromMe } = m.quoted 4 | if (!fromMe && isAdmin && isBotAdmin) await conn.sendMsg(chat, { delete: { remoteJid: m.chat, fromMe: false, id: m.quoted.id, participant: m.quoted.sender } }) 5 | else await conn.sendMsg(chat, { delete: m.quoted.vM.key }) 6 | } 7 | 8 | handler.menugroup = ['del', 'delete'] 9 | handler.tagsgroup = ['group'] 10 | handler.command = /^(d(el(ete)?)?)$/i 11 | 12 | export default handler -------------------------------------------------------------------------------- /plugins/group/delppgc.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | await conn.removeProfilePicture(m.chat) 3 | } 4 | 5 | handler.menugroup = ['delppgc'] 6 | handler.tagsgroup = ['group'] 7 | handler.command = /^(d(el(ete)?)?pp(gc|gro?up)?)$/i 8 | 9 | handler.admin = true 10 | handler.botAdmin = true 11 | handler.group = true 12 | 13 | export default handler -------------------------------------------------------------------------------- /plugins/group/demote.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn }) => { 4 | let who = m.quoted ? m.quoted.sender : m.mentionedJid ? m.mentionedJid[0] : '' 5 | if (!who || who.includes(conn.user.jid) || m.sender == who) throw `*quote / @tag* salah satu !` 6 | let ow = db.data.datas 7 | let data = [...global.mods, ...ow.rowner.map(v => v[0]), ...ow.owner.map(v => v[0])].map(v => v + '@s.whatsapp.net') 8 | if (data.some(v => who.includes(v))) return m.reply(`Gaboleh gitu :v`) 9 | try { 10 | await conn.groupParticipantsUpdate(m.chat, [who], 'demote') 11 | await conn.reply(m.chat, `@${m.sender.split`@`[0]} telah memberhentikan @${who.split`@`[0]} dari admin.`, fkontak, { mentions: [m.sender, who] }) 12 | } catch (e) { 13 | console.log(e) 14 | } 15 | } 16 | 17 | handler.menugroup = ['demote @tag'] 18 | handler.tagsgroup = ['group'] 19 | handler.command = /^(demote)$/i 20 | 21 | handler.admin = true 22 | handler.botAdmin = true 23 | handler.group = true 24 | 25 | export default handler -------------------------------------------------------------------------------- /plugins/group/durasisewa.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn }) => { 4 | let chat = db.data.chats[m.chat] 5 | if (chat.expired == 0 || chat.expired == null) return m.reply(`[ ! ] Bot join permanen, tidak ada durasi.`) 6 | await conn.reply(m.chat, `Sisa Waktu Sewa :\n\n*${((chat.joindate + chat.joincd) - new Date()).toTimeString()}*`, m) 7 | } 8 | 9 | handler.menugroup = ['durasisewa'] 10 | handler.tagsgroup = ['group'] 11 | handler.command = /^((cek)?(durasi|info)(sewa|join)(bot)?)$/i 12 | 13 | handler.group = true 14 | 15 | export default handler -------------------------------------------------------------------------------- /plugins/group/getbio.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, args, isOwner, participants }) => { 2 | if (m.quoted) { 3 | try { 4 | let user = m.quoted.sender; 5 | let bio = await conn.fetchStatus(m.quoted.sender) 6 | m.reply(`[ bio @${(user || '').replace(/@s\.whatsapp\.net/g, '')} ]\n\n${bio.status}`, null, { mentions: [user] }) 7 | } catch (e) { 8 | console.log(e) 9 | let user = m.quoted.sender; 10 | m.reply(`Bio @${(user || '').replace(/@s\.whatsapp\.net/g, '')} di private.`, null, { mentions: [user] }) 11 | } 12 | } else { 13 | if (!text) return m.reply(`*@tag* someone!`) 14 | try { 15 | let who = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted.sender 16 | let bio = await conn.fetchStatus(who) 17 | m.reply(`[ bio @${(who || '').replace(/@s\.whatsapp\.net/g, '')} ]\n\n${bio.status}`, null, { mentions: [who] }) 18 | } catch (e) { 19 | console.log(e) 20 | let user = m.mentionedJid[0] 21 | m.reply(`Bio @${(user || '').replace(/@s\.whatsapp\.net/g, '')} di private.`, null, { mentions: [user] }) 22 | } 23 | } 24 | } 25 | 26 | handler.menugroup = ['getbio @tag'] 27 | handler.tagsgroup = ['group'] 28 | handler.command = /^(get(about|bio))$/i 29 | 30 | handler.group = true 31 | 32 | export default handler -------------------------------------------------------------------------------- /plugins/group/getpp.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn }) => { 2 | let who, pp 3 | if (m.isGroup) who = m.quoted ? m.quoted.sender : m.mentionedJid[0] ? m.mentionedJid[0] : m.sender 4 | else who = m.quoted ? m.quoted.sender : m.chat 5 | try { 6 | try { pp = await conn.profilePictureUrl(who, 'image') } 7 | catch { pp = './src/avatar_contact.png' } 8 | await conn.sendMsg(m.chat, { image: { url: pp }, caption: `pp from @${who.split`@`[0]}`, mentions: [who] }, { quoted: m }) 9 | } catch (e) { 10 | console.log(e) 11 | m.reply(`Gagal mengambil pp user.`) 12 | } 13 | } 14 | 15 | handler.menugroup = ['getprofile @tag'] 16 | handler.tagsgroup = ['group'] 17 | handler.command = /^(get(pp|profile)(user)?|ava)$/i 18 | 19 | export default handler -------------------------------------------------------------------------------- /plugins/group/getppgc.js: -------------------------------------------------------------------------------- 1 | let handler = async(m, { conn }) => { 2 | try { 3 | let url = await conn.profilePictureUrl(m.chat, 'image') 4 | await conn.sendMsg(m.chat, { image: { url: url } }, { quoted: m }) 5 | } catch (e) { 6 | console.log(e) 7 | m.reply(`Gagal mengambil pp grup.`) 8 | } 9 | } 10 | 11 | handler.menugroup = ['getppgc'] 12 | handler.tagsgroup = ['group'] 13 | handler.command = /^((getpp|ava)(gc|gro?up))$/i 14 | 15 | handler.group = true 16 | 17 | export default handler -------------------------------------------------------------------------------- /plugins/group/link.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { areJidsSameUser } from 'baileys' 3 | 4 | let handler = async (m, { conn, args }) => { 5 | let group = m.chat 6 | if (/^[0-9]{5,16}-?[0-9]+@g\.us$/.test(args[0])) group = args[0] 7 | if (!/^[0-9]{5,16}-?[0-9]+@g\.us$/.test(group)) throw db.data.datas.linkgc || 'https://chat.whatsapp.com/EzxQmm6lU7206XIMZ32wqs' 8 | let groupMetadata = await conn.groupMetadata(group) 9 | if (!groupMetadata) throw 'groupMetadata is undefined :\\' 10 | if (!('participants' in groupMetadata)) throw 'participants is not defined :(' 11 | let me = groupMetadata.participants.find(user => areJidsSameUser(user.id, conn.user.id)) 12 | if (!me) throw 'Aku tidak ada di grup itu :(' 13 | if (!me.admin) throw 'Aku bukan admin T_T' 14 | m.reply(`[ LINK GROUP ]\n\nhttps://chat.whatsapp.com/${await conn.groupInviteCode(group)}`) 15 | } 16 | 17 | handler.menugroup = ['linkgroup'] 18 | handler.tagsgroup = ['group'] 19 | handler.command = /^(link(gc|gro?up)?|(gc|gro?up)link)$/i 20 | 21 | export default handler -------------------------------------------------------------------------------- /plugins/group/linkgcbot.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, command }) => { 4 | await conn.reply(m.chat, `*[ LINK GRUP BOT ]*\n\n${db.data.datas.linkgc}` || '[ ! ] Link GC belum di set oleh Owner.', m) 5 | } 6 | 7 | handler.menugroup = ['linkgcbot'] 8 | handler.tagsgroup = ['group'] 9 | handler.command = /^((link)?(gc|gro?up)bot)$/i 10 | 11 | export default handler -------------------------------------------------------------------------------- /plugins/group/listprem.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { parsePhoneNumber } from 'awesome-phonenumber' 3 | 4 | let handler = async (m, { conn, usedPrefix }) => { 5 | let prems = db.data.datas.prems.filter(v => v.user !== '').sort((a, b) => a.date - b.date) 6 | if (prems.length == 0) return m.reply (`Tidak ada user premium !`) 7 | let z = 1, timer 8 | let txt = `*[ LIST PREMIUM USER ]*\n` 9 | for (let i of prems) { 10 | let name = await conn.getName(i.user) 11 | let pn = await parsePhoneNumber('+'+i.user.split('@')[0]).number.international 12 | timer = i.date - new Date() 13 | if (timer <= 0) {} 14 | else { 15 | txt += `\n*[${z}] ${name}*\n` 16 | txt += `┗⊱ ${timer.toTimeString()}` 17 | z++ 18 | } 19 | } 20 | await m.reply(txt) 21 | } 22 | 23 | handler.menugroup = ['listprem'] 24 | handler.tagsgroup = ['group'] 25 | handler.command = /^(listprem|premlist)$/i 26 | 27 | export default handler -------------------------------------------------------------------------------- /plugins/group/pengumuman.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, usedPrefix, command, participants }) => { 2 | let q = m.quoted ? m.quoted : m 3 | let mime = (q.msg || q).mimetype || q.mediaType || '' 4 | text = text ? text : m.quoted?.text ? m.quoted.text : m.quoted?.caption ? m.quoted.caption : m.quoted?.description ? m.quoted.description : '' 5 | if (!text) throw `Example : ${usedPrefix + command} ayo mabar` 6 | text = text.trim() 7 | if (text.includes('\n')) text = text.replace('\n',`\n@${m.chat}\n`) 8 | else text = text+`\n@${m.chat}` 9 | let cox = { contextInfo: { 10 | mentionedJid: participants.map(a => a.id), 11 | groupMentions: [{ 12 | groupJid: m.chat, 13 | groupSubject: 'everyone' 14 | }] 15 | }} 16 | await conn.sendMessage(m.chat, /video|image/g.test(mime) && !/webp/g.test(mime) ? { 17 | [/video/g.test(mime) ? 'video' : 'image']: await q.download(), caption: text, contextInfo: cox.contextInfo 18 | } : { text, contextInfo: cox.contextInfo }, { quoted: fkontak }) 19 | } 20 | 21 | handler.menugroup = ['hidetag'].map(v => v + ' ') 22 | handler.tagsgroup = ['group'] 23 | handler.command = /^(pengumuman|announce|hidd?en?tag)$/i 24 | 25 | handler.admin = true 26 | handler.botAdmin = true 27 | handler.group = true 28 | 29 | export default handler -------------------------------------------------------------------------------- /plugins/group/poll.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, usedPrefix, command, participants }) => { 2 | text = text.split(`|`) 3 | if (!text || text.length == 1) throw `Format :\n*${usedPrefix + command} deskripsi|pilih1|pilih2|dst...*\n\nContoh :\n*${usedPrefix + command} rombak admin|iya|tidak*` 4 | if (text.length > 1 && text.length < 3) throw `[!] Minimal input *2* pilihan!` 5 | if (text.length > 13) throw `[!] Pilihan terlalu banyak, maksimal *12* !` 6 | let array = [] 7 | text.slice(1).forEach(function(i) { array.push(i) }) 8 | await conn.sendPoll(m.chat, text[0], array) 9 | } 10 | 11 | handler.menugroup = ['poll |opts1|opts2|etc...'] 12 | handler.tagsgroup = ['group'] 13 | handler.command = /^((create)?poll(ing)?)$/i 14 | 15 | handler.group = true 16 | 17 | export default handler -------------------------------------------------------------------------------- /plugins/group/promote.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | let who = m.quoted ? m.quoted.sender : m.mentionedJid ? m.mentionedJid[0] : '' 3 | if (!who || who.includes(conn.user.jid) || m.sender == who) throw `*quote / @tag* salah satu !` 4 | try { 5 | await conn.groupParticipantsUpdate(m.chat, [who], 'promote') 6 | await conn.reply(m.chat, `@${m.sender.split`@`[0]} telah menjadikan @${who.split`@`[0]} sebagai admin.`, fkontak, { mentions: [m.sender, who] }) 7 | } catch (e) { 8 | console.log(e) 9 | } 10 | } 11 | 12 | handler.menugroup = ['promote @tag'] 13 | handler.tagsgroup = ['group'] 14 | handler.command = /^(promote)$/i 15 | 16 | handler.admin = true 17 | handler.botAdmin = true 18 | handler.group = true 19 | 20 | export default handler -------------------------------------------------------------------------------- /plugins/group/setnamegc.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | if (!text) throw 'masukkan nama grup' 3 | await conn.groupUpdateSubject(m.chat, text) 4 | } 5 | 6 | handler.menugroup = ['setnamegc'] 7 | handler.tagsgroup = ['group'] 8 | handler.command = /^(setname(gc|gro?up)?)$/i 9 | 10 | handler.admin = true 11 | handler.botAdmin = true 12 | handler.group = true 13 | 14 | export default handler -------------------------------------------------------------------------------- /plugins/group/settings.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, args, usedPrefix, command }) => { 2 | let isClose = { // Switch Case Like :v 3 | 'open': 'not_announcement', 4 | 'close': 'announcement', 5 | }[(args[0] || '')] 6 | if (isClose === undefined) 7 | throw ` 8 | *Contoh Penggunaan :* 9 | *○ ${usedPrefix + command} close* 10 | *○ ${usedPrefix + command} open* 11 | `.trim() 12 | await conn.groupSettingUpdate(m.chat, isClose) 13 | } 14 | 15 | handler.menugroup = ['group *open / close*'] 16 | handler.tagsgroup = ['group'] 17 | handler.command = /^(gro?up)$/i 18 | 19 | handler.admin = true 20 | handler.botAdmin = true 21 | handler.group = true 22 | 23 | export default handler 24 | -------------------------------------------------------------------------------- /plugins/group/setwelcomebye.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, command, usedPrefix, text}) => { 4 | let subject = await conn.getName(m.chat) 5 | if (!text) return await conn.reply(m.chat, `[ ! ] Masukkan teks.\n\n*Tips :*\n@user - menampilkan tag user.${command.includes('bye') ? '' : '\n@subject - menampilkan nama grup.\n@desc - menampilkan deskripsi grup'}\n\n${command.includes('bye') ? `*Contoh :*\n${usedPrefix + command} Sayonara @user!\n\n*Hasil teks :*\nSayonara @${m.sender.split('@')[0]} !` : `*Contoh :*\n${usedPrefix + command} Hallo @user, Selamat Datang di @subject\n\n*Hasil teks :*\nHallo @${m.sender.split('@')[0]}, Selamat Datang di ${subject}`}`, m, { mentions: [m.sender] }) 6 | let chat = db.data.chats[m.chat] 7 | if (text.toLowerCase() == 'default' || text.toLowerCase() == 'reset') text = '' 8 | if (command.includes('bye')) chat.sBye = text 9 | else chat.sWelcome = text 10 | await m.reply(`Berhasil mengubah *${command.includes('bye') ? 'Bye' : 'Welcome'}* menjadi :\n\n${text}`) 11 | } 12 | 13 | handler.menugroup = ['setwelcome', 'setbye'] 14 | handler.tagsgroup = ['group'] 15 | handler.command = /^(set(welcome|bye))$/i 16 | 17 | handler.admin = true 18 | handler.botAdmin = true 19 | handler.group = true 20 | 21 | export default handler -------------------------------------------------------------------------------- /plugins/group/tagall.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, participants }) => { 2 | let q = m.quoted ? m.quoted : m 3 | let mime = (q.msg || q).mimetype || q.mediaType || '' 4 | let teks = `⋙ *Pesan dari Admin Group* ⋘ \n\n${text ? text : m.quoted?.text ? m.quoted.text : m.quoted?.caption ? m.quoted.caption : m.quoted?.description ? m.quoted.description : 'Nothing'}\n\n` 5 | teks += `┌─\n` 6 | for (let mem of participants) { 7 | teks += `│◦❒ @${mem.id.split('@')[0]}\n` 8 | } 9 | teks += `└────` 10 | if (/video|image/g.test(mime) && !/webp/g.test(mime)) { 11 | let media = await q.download?.() 12 | await conn.sendFile(m.chat, media, '', teks, null, false, { mentions: participants.map(a => a.id), quoted: fkontak }) 13 | } else await conn.reply(m.chat, teks, fkontak, { mentions: participants.map(a => a.id) }) 14 | } 15 | 16 | handler.menugroup = ['tagall'] 17 | handler.tagsgroup = ['group'] 18 | handler.command = /^(tagall)$/i 19 | 20 | handler.admin = true 21 | handler.botAdmin = true 22 | handler.group = true 23 | 24 | export default handler -------------------------------------------------------------------------------- /plugins/group/vote.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, command }) => { 2 | let id = m.chat 3 | conn.vote = conn.vote ? conn.vote : {} 4 | if (!(id in conn.vote)) throw `_*tidak ada voting digrup ini!*_\n\n*${usedPrefix}vote* - untuk memulai vote` 5 | let isVote = conn.vote[id][1].concat(conn.vote[id][2]) 6 | const wasVote = isVote.includes(m.sender) 7 | if (wasVote) throw 'Kamu sudah vote!' 8 | if (/up/i.test(command)) { 9 | conn.vote[id][1].push(m.sender) 10 | m.reply(`selesai upvote!\n\n*${usedPrefix}cekvote* untuk melihat list`) 11 | } else if (/de/i.test(command)) { 12 | conn.vote[id][2].push(m.sender) 13 | m.reply(`selesai devote!\n\n*${usedPrefix}cekvote* untuk melihat list`) 14 | } 15 | 16 | } 17 | 18 | handler.menugroup = ['vote'] 19 | handler.tagsgroup = ['group'] 20 | handler.command = /^((up|de)vote)$/i 21 | 22 | handler.group = true 23 | 24 | export default handler -------------------------------------------------------------------------------- /plugins/group/votecek.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix }) => { 2 | let id = m.chat 3 | conn.vote = conn.vote ? conn.vote : {} 4 | if (!(id in conn.vote)) throw `_*tidak ada voting digrup ini!*_\n\n*${usedPrefix}mulaivote* - untuk memulai vote` 5 | 6 | let [reason, upvote, devote] = conn.vote[id] 7 | let mentionedJid = [...upvote, ...devote] 8 | m.reply( 9 | `*「 VOTE 」* 10 | 11 | *${reason}* 12 | 13 | ┌〔 UPVOTE 〕 14 | │ 15 | ├ Total: ${upvote.length} 16 | ${upvote.map(u => '├ @' + u.split('@')[0]).join('\n')} 17 | │ 18 | └──── 19 | 20 | ┌〔 DEVOTE 〕 21 | │ 22 | ├ Total: ${devote.length}_ 23 | ${devote.map(u => '├ @' + u.split('@')[0]).join('\n')} 24 | │ 25 | └──── 26 | 27 | *${usedPrefix}hapusvote* - untuk menghapus vote 28 | 29 | _© ${pauthor}_ 30 | `.trim(), false, { contextInfo: { mentionedJid } }) 31 | } 32 | 33 | handler.menugroup = ['cekvote'] 34 | handler.tagsgroup = ['group'] 35 | handler.command = /^(cekvote)$/i 36 | 37 | handler.group = true 38 | 39 | export default handler 40 | -------------------------------------------------------------------------------- /plugins/group/votedel.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix }) => { 2 | let id = m.chat 3 | conn.vote = conn.vote ? conn.vote : {} 4 | if (!(id in conn.vote)) return m.reply(`_*tidak ada voting digrup ini!*_\n\n*${usedPrefix}vote* - untuk memulai vote`) 5 | delete conn.vote[id] 6 | m.reply(`Berhasil Menghapus Sesi Vote Di Grup Ini`) 7 | 8 | } 9 | 10 | handler.menugroup = ['hapusvote'] 11 | handler.tagsgroup = ['group'] 12 | handler.command = /^((del(ete)?|hapus)vote)$/i 13 | 14 | handler.group = true 15 | handler.admin = true 16 | 17 | export default handler -------------------------------------------------------------------------------- /plugins/info/carigrup.js: -------------------------------------------------------------------------------- 1 | import { linkwa } from '../../lib/scrape.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `[!] Mau nyari grup apa ?\n\nContoh:\n*${usedPrefix + command} mabar*` 5 | try { 6 | let anu = await linkwa(text) 7 | if (anu.length == 0) throw Error() 8 | let teks = anu.map(v => v.nama + '\n' + '_' + v.link + '_').join('\n───────────────────\n') 9 | let image = 'https://telegra.ph/file/f5ec51bac808f543ef1d7.png' 10 | await conn.sendMsg(m.chat, { image: { url: image }, caption: teks }, { quoted: m }) 11 | } catch (e) { 12 | console.log(e) 13 | throw 'grup tidak ditemukan!' 14 | } 15 | } 16 | 17 | handler.help = ['carigrup'] 18 | handler.tags = ['information'] 19 | handler.command = /^((cari|find)(link)?(gc|gro?up))$/i 20 | 21 | handler.premium = true 22 | handler.limit = true 23 | 24 | export default handler -------------------------------------------------------------------------------- /plugins/info/cekapi.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { text }) => { 2 | try { 3 | let res = await fetch(`https://api.lolhuman.xyz/api/checkapikey?apikey=${text ? text.trim() : api.lol}`) 4 | let anu = await res.json() 5 | if (anu.status != '200') return m.reply(anu.message) 6 | anu = anu.result 7 | let txt = `*Username : ${anu.username}*\n\n` 8 | txt += `*Account Type :* ${anu.account_type}\n` 9 | txt += `*Hit Today :* ${anu.today}${((anu.account_type.toLowerCase() != 'vip') && anu.today == 1000) ? ' ( Daily Limit Reached )' : ''}\n` 10 | txt += `*Total Hit :* ${anu.requests}\n` 11 | txt += `*Expired :* ${anu.expired}` 12 | await m.reply(txt) 13 | } catch (e) { 14 | console.log(e) 15 | m.reply(`Website Down !`) 16 | } 17 | } 18 | 19 | handler.help = ['cekapilol'] 20 | handler.tags = ['information'] 21 | handler.command = /^(ch?ec?kapi(key)?lol(human)?)$/i 22 | 23 | export default handler -------------------------------------------------------------------------------- /plugins/info/chord.js: -------------------------------------------------------------------------------- 1 | import { chord } from '../../lib/scrape.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `Example : ${usedPrefix + command} melukis senja` 5 | try { 6 | let anu = await chord(text) 7 | if (!anu.status) throw Error() 8 | m.reply(anu.chord) 9 | } catch (e) { 10 | console.log(e) 11 | m.reply(`Chord tidak ditemukan.`) 12 | } 13 | } 14 | 15 | handler.help = ['chord '] 16 | handler.tags = ['information'] 17 | handler.command = /^(chord)$/i 18 | 19 | handler.premium = true 20 | handler.limit = true 21 | 22 | export default handler -------------------------------------------------------------------------------- /plugins/info/corona.js: -------------------------------------------------------------------------------- 1 | import { delay, pickRandom, somematch } from '../../lib/func.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | try { 5 | let test = /global/i.test(text || '') ? 'global' : 'indonesia' 6 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/corona/${test}?apikey=${api.lol}`)).json() 7 | let txt = `*corona ${test}*\n` 8 | if (anu.status != 200) return m.reply(anu.message) 9 | for (let x of Object.keys(anu.result)) { 10 | txt += `\n*${x} :* ${anu.result[x]}` 11 | } 12 | m.reply(txt) 13 | } catch (e) { 14 | console.log(e) 15 | m.reply('internal server error.') 16 | } 17 | } 18 | 19 | handler.help = ['corona'] 20 | handler.tags = ['information'] 21 | handler.command = /^((info)?corona)$/i 22 | 23 | handler.limit = true 24 | 25 | export default handler -------------------------------------------------------------------------------- /plugins/info/detectface.js: -------------------------------------------------------------------------------- 1 | import uploadImage from '../../lib/uploadImage.js' 2 | 3 | let handler = async (m, { conn, args, usedPrefix, command }) => { 4 | let q = m.quoted ? m.quoted : m 5 | let mime = (q.msg || q).mimetype || q.mediaType || '' 6 | if ((/image/g.test(mime) && !/webp/g.test(mime))) { 7 | try { 8 | let img = await q.download?.() 9 | let out = await uploadImage(img) 10 | let anu = await fetch(`https://api.lolhuman.xyz/api/facedetect?apikey=${api.lol}&img=${out}`) 11 | if (anu.status != 200) throw Error(anu.message) 12 | await conn.sendMsg(m.chat, { image: Buffer.from(await anu.arrayBuffer()) }, { quoted: m }) 13 | } catch (e) { 14 | console.log(e) 15 | throw 'Internal server error.' 16 | } 17 | } else m.reply(`Kirim gambar dengan caption *${usedPrefix + command}* atau tag gambar yang sudah dikirim`) 18 | } 19 | 20 | handler.help = ['deteksiwajah'] 21 | handler.tags = ['information'] 22 | handler.command = /^(dete(ksi|ct)(wajah|face))$/i 23 | 24 | handler.premium = true 25 | handler.limit = true 26 | 27 | export default handler -------------------------------------------------------------------------------- /plugins/info/get.js: -------------------------------------------------------------------------------- 1 | import { isUrl } from '../../lib/func.js' 2 | 3 | let handler = async (m, { conn, text, isOwner }) => { 4 | if (!isUrl(text)) throw 'url invalid, please input a valid url. Try with add http:// or https://' 5 | let { href: url, origin } = new URL(text) 6 | try { 7 | let res = await fetch(url, { headers: { 'referer': origin }}) 8 | if (res.headers.get('content-length') > 100 * 1024 * 1024 * 1024) throw `Content-Length: ${res.headers.get('content-length')}` 9 | if (!/text|json/.test(res.headers.get('content-type'))) return await conn.sendFile(m.chat, url, '', pauthor, m) 10 | let txt = Buffer.from(await res.arrayBuffer()) 11 | try { 12 | txt = JSON.stringify(JSON.parse(txt + ''), null, 2) 13 | } catch { 14 | txt = txt + '' 15 | } 16 | // only owner can see the ip address (both ip v4 and v6) 17 | if (!isOwner) txt = txt.replace(/\b(?:\d{1,3}\.){3}\d{1,3}\b|[A-Fa-f0-9]{1,4}(?::[A-Fa-f0-9]{1,4}){7}/g, "#hidden") 18 | m.reply(txt.trim().slice(0, 65536) + '') 19 | } catch (e) { 20 | console.log(e) 21 | m.reply('fetch failed.') 22 | } 23 | } 24 | 25 | handler.help = ['fetch '] 26 | handler.tags = ['information'] 27 | handler.command = /^(fetch|get)$/i 28 | 29 | export default handler -------------------------------------------------------------------------------- /plugins/info/growtopia.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | try { 3 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/growtopia?apikey=${api.lol}`)).json() 4 | if (anu.status == 200) { 5 | anu = anu.result 6 | let txt = `*Player Online :* ${anu.player_online}` 7 | + `\n\n*[WOTD]*` 8 | + `\n*name :* ${anu.wotd.name}` 9 | + `\n*preview :* ${anu.wotd.preview}` 10 | await conn.sendFile(m.chat, anu.wotd.preview.replace('www.growtopiagame.com/worlds', 's3.amazonaws.com/world.growtopiagame.com'), '', txt, m) 11 | } else m.reply(anu.message) 12 | } catch (e) { 13 | console.log(e) 14 | m.reply('internal server error.') 15 | } 16 | } 17 | 18 | handler.help = ['growtopia'] 19 | handler.tags = ['information'] 20 | handler.command = /^(growtopia)$/i 21 | 22 | handler.limit = true 23 | 24 | export default handler -------------------------------------------------------------------------------- /plugins/info/hoax.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, usedPrefix, command }) => { 2 | try { 3 | let res = await fetch(`https://api.lolhuman.xyz/api/turnbackhoax?apikey=${api.lol}`) 4 | let json = await res.json() 5 | let get_result = json.result 6 | if (get_result.length == 0) throw Error(`Informasi tidak tersedia.`) 7 | let txt = '*Info Hoax :*' 8 | for (var x of get_result) { 9 | txt += `\n\nTitle : *${x.title}*\n` 10 | txt += `Link : ${decodeURIComponent(x.link)}\n` 11 | txt += `Posted : ${x.posted}\n` 12 | txt += `Description : ${x.desc}\n` 13 | txt += `───────────────────` 14 | } 15 | await m.reply(txt) 16 | } catch (e) { 17 | console.log(e) 18 | m.reply(`Informasi tidak tersedia.`) 19 | } 20 | } 21 | 22 | handler.help = ['hoax'] 23 | handler.tags = ['information'] 24 | handler.command = /^((info)?hoax)$/i 25 | 26 | handler.premium = true 27 | handler.limit = true 28 | 29 | export default handler -------------------------------------------------------------------------------- /plugins/info/imdb.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, usedPrefix, command }) => { 2 | if (!text) return m.reply(`Example : ${usedPrefix + command} Avengers`) 3 | try { 4 | let anu = await (await fetch(`https://api.popcat.xyz/imdb?q=${encodeURIComponent(text)}`)).json() 5 | if (anu.error) throw Error() 6 | let txt = `*${anu.title}*\n\n` 7 | + `_${anu.imdburl}_\n\n` 8 | + `*Rating :*\n` 9 | for (let x of anu.ratings) { 10 | txt += `━ ${x.value} _( ${x.source} )_\n` 11 | } 12 | txt += `\n*released :* ${anu.released}\n` 13 | + `*rated : ${anu.rated}*\n` 14 | + `*runtime :* ${anu.runtime}\n` 15 | + `*genres :* ${anu.genres}\n` 16 | + `*languages :* ${anu.languages}\n` 17 | + `*released :* ${anu.released}\n` 18 | + `*director :* ${anu.director}\n` 19 | + `*writer :* ${anu.writer}\n` 20 | + `*actor :* ${anu.actors}\n\n` 21 | + `*plot :*\n_"${anu.plot.trim()}"_` 22 | await conn.sendMsg(m.chat, { image: { url: anu.poster }, caption: txt }, { quoted: m }) 23 | } catch (e) { 24 | console.log(e) 25 | m.reply(`Result not found.`) 26 | } 27 | } 28 | 29 | handler.help = ['imdb '] 30 | handler.tags = ['information'] 31 | handler.command = /^(film|imdb)$/i 32 | 33 | handler.premium = true 34 | handler.limit = true 35 | 36 | export default handler -------------------------------------------------------------------------------- /plugins/info/jadwaltvnow.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, usedPrefix, command }) => { 2 | try { 3 | let res = await fetch(`https://api.lolhuman.xyz/api/jadwaltv/now?apikey=${api.lol}`) 4 | let json = await res.json() 5 | let get_result = json.result 6 | let txt = `*Jadwal TV Now :*` 7 | for (let x in get_result) { 8 | txt += `\n\n${x.toUpperCase()}${get_result[x]}\n───────────────────` 9 | } 10 | m.reply(txt) 11 | } catch (e) { 12 | console.log(e) 13 | m.reply(`Jadwal tidak tersedia.`) 14 | } 15 | } 16 | 17 | handler.help = ['jadwaltvnow'] 18 | handler.tags = ['information'] 19 | handler.command = /^(jadwaltvnow)$/i 20 | 21 | handler.premium = true 22 | handler.limit = true 23 | 24 | export default handler -------------------------------------------------------------------------------- /plugins/info/lookup.js: -------------------------------------------------------------------------------- 1 | async function lookup(url) { 2 | let anu 3 | try { 4 | anu = await fetch(`https://api.api-ninjas.com/v1/dnslookup?domain=${url}`, { 5 | headers: { 'X-Api-Key': 'E4/gdcfciJHSQdy4+9+Ryw==JHciNFemGqOVIbyv' }, 6 | contentType: 'application/json' 7 | }).then(v => v.text()) 8 | return JSON.stringify(JSON.parse(anu), null, 2) 9 | } catch (e) { 10 | console.log(e) 11 | anu = await fetch(`https://api.hackertarget.com/dnslookup/?q=${url}`).then(v => v.text()) 12 | return anu 13 | } 14 | } 15 | 16 | let handler = async (m, { conn, text, usedPrefix, command }) => { 17 | if (!text) throw `Masukkan Domain/Sub Domain!\n\n*Contoh:* botcahx.live` 18 | let anu = await lookup(text.replace(/^https?:\/\//, '')) 19 | m.reply(`*Hasil Dns Lookup ${text} :*\n\n${anu}`) 20 | } 21 | 22 | handler.help = ['lookup','dns'] 23 | handler.tags = ['information'] 24 | handler.command = /^(dns|lookup|dnslookup|hacktarget)$/i 25 | 26 | handler.limit = true 27 | 28 | export default handler -------------------------------------------------------------------------------- /plugins/info/nama.js: -------------------------------------------------------------------------------- 1 | import { delay } from '../../lib/func.js' 2 | 3 | let handler = async (m, { conn, usedPrefix, command }) => { 4 | await delay(2000) 5 | try { 6 | let res = await fetch(`https://api.lolhuman.xyz/api/random/nama?apikey=${api.lol}`) 7 | let json = await res.json() 8 | m.reply(json.result) 9 | } catch (e) { 10 | console.log(e) 11 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 12 | } 13 | } 14 | 15 | handler.help = ['randomnama'] 16 | handler.tags = ['information'] 17 | handler.command = /^(randomnama)$/i 18 | 19 | handler.limit = true 20 | 21 | export default handler -------------------------------------------------------------------------------- /plugins/info/ocr.js: -------------------------------------------------------------------------------- 1 | import uploadImage from '../../lib/uploadImage.js' 2 | import { createWorker } from 'tesseract.js'; 3 | 4 | let handler = async (m, { usedPrefix, command }) => { 5 | let q = m.quoted ? m.quoted : m 6 | let mime = (q.msg || q).mimetype || q.mediaType || '' 7 | if ((/image/g.test(mime) && !/webp/g.test(mime))) { 8 | let img = await q.download?.() 9 | try { 10 | const worker = await createWorker('eng') 11 | const ret = await worker.recognize(await uploadImage(img)) 12 | await m.reply(ret.data.text) 13 | await worker.terminate() 14 | } catch (e) { 15 | console.log(e) 16 | throw 'failed to read text.' 17 | } 18 | } else { 19 | m.reply(`Kirim gambar dengan caption *${usedPrefix + command}* atau tag gambar yang sudah dikirim`) 20 | } 21 | } 22 | 23 | handler.help = ['ocr'] 24 | handler.tags = ['information'] 25 | handler.command = /^(ocr)$/i 26 | 27 | handler.premium = true 28 | handler.limit = true 29 | 30 | export default handler -------------------------------------------------------------------------------- /plugins/info/whois.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, usedPrefix, command }) => { 2 | if (!text) throw `Masukkan Domain/Sub Domain!\n\n*Contoh:* botcahx.live` 3 | try { 4 | let options = { 5 | method: 'GET', 6 | headers: { 7 | 'Authorization': `Token=${['6c7bd1ce704d92c90e2f78d42641a9ee0cbcef198a6ad62a3dd06deb22af6fd3','e60df1f533023bffc332178b8831d62760300d5e612893e3b4fae0a4d7176101'].getRandom()}` 8 | } 9 | } 10 | let response = await fetch(`https://whoisjson.com/api/v1/whois?domain=${text.replace(/^https?:\/\//, '')}`, options) 11 | let data = await response.json() 12 | m.reply(JSON.stringify(data, null, 2)) 13 | } catch (e) { 14 | console.log(e) 15 | } 16 | } 17 | 18 | handler.help = ['whois'] 19 | handler.tags = ['information'] 20 | handler.command = /^(whois2?)$/i 21 | 22 | handler.premium = true 23 | handler.limit = true 24 | 25 | export default handler -------------------------------------------------------------------------------- /plugins/others/anonymous_chat_ans.js.js: -------------------------------------------------------------------------------- 1 | export async function before(m, { match }) { 2 | // if (match) return !1 3 | if (!m.chat.endsWith('@s.whatsapp.net')) 4 | return !0 5 | this.anonymous = this.anonymous ? this.anonymous : {} 6 | let room = Object.values(this.anonymous).find(room => [room.a, room.b].includes(m.sender) && room.state === 'CHATTING') 7 | if (room) { 8 | if (/^.*(next|leave|start)/.test(m.text)) 9 | return 10 | let other = [room.a, room.b].find(user => user !== m.sender) 11 | await m.copyNForward(other, true) 12 | } 13 | return !0 14 | } -------------------------------------------------------------------------------- /plugins/others/cmddel.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { text }) => { 4 | let hash = text 5 | if (m.quoted && m.quoted.fileSha256) hash = m.quoted.fileSha256.toString('hex') 6 | if (!hash) throw `Tidak ada hash` 7 | let sticker = db.data.sticker 8 | if (sticker[hash] && sticker[hash].locked) throw 'Kamu tidak memiliki izin untuk menghapus perintah stiker ini' 9 | delete sticker[hash] 10 | m.reply(`Berhasil!`) 11 | } 12 | 13 | 14 | handler.menuowner = ['cmddel <teks>'] 15 | handler.tagsowner = ['owner'] 16 | handler.command = /^(delcmd|cmddel)$/i 17 | 18 | handler.owner = true 19 | 20 | export default handler 21 | -------------------------------------------------------------------------------- /plugins/others/cmdlist.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn }) => { 4 | conn.reply(m.chat, ` 5 | *DAFTAR HASH* 6 | \`\`\` 7 | ${Object.entries(db.data.sticker).map(([key, value], index) => `${index + 1}. ${value.locked ? `(Terkunci) ${key}` : key} : ${value.text}`).join('\n')} 8 | \`\`\` 9 | `.trim(), null, { 10 | mentions: Object.values(db.data.sticker).map(x => x.mentionedJid).reduce((a, b) => [...a, ...b], []) 11 | }) 12 | } 13 | 14 | handler.menuowner = ['cmdlist'] 15 | handler.tagsowner = ['owner'] 16 | handler.command = /^(listcmd|cmdlist)$/i 17 | 18 | export default handler 19 | -------------------------------------------------------------------------------- /plugins/others/cmdlock.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { command }) => { 4 | if (!m.quoted) throw 'Reply Pesan!' 5 | if (!m.quoted.fileSha256) throw 'SHA256 Hash Missing' 6 | let sticker = db.data.sticker 7 | let hash = m.quoted.fileSha256.toString('hex') 8 | if (!(hash in sticker)) throw 'Hash not found in database' 9 | sticker[hash].locked = !/^un/i.test(command) 10 | m.reply('Done!') 11 | } 12 | 13 | handler.menuowner = ['cmdlock','cmdunlock'] 14 | handler.tagsowner = ['owner'] 15 | handler.command = /^((un)?lockcmd|cmd(un)?lock)$/i 16 | 17 | handler.owner = true 18 | 19 | export default handler 20 | -------------------------------------------------------------------------------- /plugins/others/cmdset.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { text, usedPrefix, command }) => { 4 | db.data.sticker = db.data.sticker || {} 5 | if (!m.quoted) throw `Balas stiker dengan perintah *${usedPrefix + command}*` 6 | if (!m.quoted.fileSha256) throw 'SHA256 Hash Missing' 7 | if (!text) throw `Penggunaan:\n${usedPrefix + command} <teks>\n\nContoh:\n${usedPrefix + command} tes` 8 | let sticker = db.data.sticker 9 | let hash = m.quoted.fileSha256.toString('base64') 10 | if (sticker[hash] && sticker[hash].locked) throw 'Kamu tidak memiliki izin untuk mengubah perintah stiker ini' 11 | sticker[hash] = { 12 | text, 13 | mentionedJid: m.mentionedJid, 14 | creator: m.sender, 15 | at: + new Date, 16 | locked: false, 17 | } 18 | m.reply(`Berhasil!`) 19 | } 20 | 21 | handler.menuowner = ['cmdset'] 22 | handler.tagsowner = ['owner'] 23 | handler.command = /^((set|add)cmd|cmd(set|add))$/i 24 | 25 | handler.owner = true 26 | 27 | export default handler 28 | -------------------------------------------------------------------------------- /plugins/others/jasadonasi.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, usedPrefix, command }) => { 4 | let p = db.data.datas.teksdonasi 5 | if (!p) throw `[ ! ] Belum di set oleh owner.\n\nCommand *${usedPrefix}setteksdonasi* untuk menambahkan teks ${command}` 6 | await m.reply(p) 7 | } 8 | 9 | handler.menugroup = ['donasi'] 10 | handler.tagsgroup = ['group'] 11 | handler.command = /^(dona(te|si))$/i 12 | 13 | export default handler -------------------------------------------------------------------------------- /plugins/others/jasasc.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command }) => { 2 | conn.reply(m.chat, `*「 BY ZERENITY 」* 3 | 4 | *⭔ Multi Auth ( multiple file session )* 5 | https://github.com/clicknetcafe/avalon-md`, m) 6 | } 7 | 8 | handler.command = /^(sc|sourcecode)$/i 9 | 10 | export default handler -------------------------------------------------------------------------------- /plugins/others/jasatopup.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, usedPrefix, command }) => { 4 | let p = db.data.datas.tekstopup 5 | if (!p) throw `[ ! ] Belum di set oleh owner.\n\nCommand *${usedPrefix}settekstopup* untuk menambahkan teks ${command}` 6 | await m.reply(p) 7 | } 8 | 9 | handler.menugroup = ['topup'] 10 | handler.tagsgroup = ['group'] 11 | handler.command = /^(topup)$/i 12 | 13 | export default handler -------------------------------------------------------------------------------- /plugins/others/keranghow.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, text, usedPrefix }) => { 2 | if (!text) throw `Use example ${usedPrefix}${command} i'm` 3 | conn.reply(m.chat, ` 4 | ${command} *${text}* 5 | *${text}* is *${(101).getRandom()}*% ${command.replace('how', '').replace('cek', '').toUpperCase()} 6 | `.trim(), m, m.mentionedJid ? { 7 | mentions: m.mentionedJid 8 | } : {}) 9 | } 10 | 11 | handler.menufun = ['gay', 'pintar', 'cantik', 'ganteng', 'gabut', 'gila', 'lesbi', 'stress', 'bucin', 'jones', 'sadboy'].map(v => 'how' + v + ' siapa?') 12 | handler.tagsfun = ['kerang'] 13 | handler.command = /^((how|cek)(gay|pintar|cantik|ganteng|gabut|gila|lesbi|stress?|bucin|jones|sadboy))/i 14 | 15 | handler.group = true 16 | 17 | export default handler -------------------------------------------------------------------------------- /plugins/others/kerangkerangajaib.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { text, command, usedPrefix }) => { 2 | if (!text) throw `Use example ${usedPrefix}${command} i'm alien?` 3 | m.reply(`"${[ 4 | 'Mungkin suatu hari', 5 | 'Tidak juga', 6 | 'Tidak keduanya', 7 | 'Kurasa tidak', 8 | 'Ya', 9 | 'Coba tanya lagi', 10 | 'Tidak ada' 11 | ].getRandom()}."`) 12 | } 13 | 14 | handler.menufun = ['kerang', 'kerangajaib'].map(v => v + ' <teks>') 15 | handler.tagsfun = ['kerang'] 16 | 17 | handler.command = /^((kulit)?kerang(ajaib)?)$/i 18 | 19 | export default handler 20 | -------------------------------------------------------------------------------- /plugins/others/msgadd.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | const { proto } = (await import('baileys')).default 3 | 4 | let handler = async (m, { conn, command, usedPrefix, text }) => { 5 | let M = proto.WebMessageInfo 6 | if (!m.quoted) throw `Balas pesan dengan perintah *${usedPrefix + command}*` 7 | if (!text) throw `Pengunaan:${usedPrefix + command} <teks>\n\nContoh:\n${usedPrefix + command} tes` 8 | let msgs = db.data.msgs 9 | if (text in msgs) throw `'${text}' telah terdaftar!` 10 | msgs[text] = M.fromObject(await m.getQuotedObj()).toJSON() 11 | m.reply(`Berhasil menambahkan pesan '${text}'\n\nAkses dengan mengetik namanya`.trim()) 12 | } 13 | 14 | handler.menuowner = ['msg'].map(v => 'add' + v + ' <teks>') 15 | handler.tagsowner = ['owner'] 16 | handler.command = /^(addmsg|msgadd)$/i 17 | 18 | handler.owner = true 19 | 20 | export default handler 21 | -------------------------------------------------------------------------------- /plugins/others/msgdel.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { command, usedPrefix, text }) => { 4 | if (!text) throw `Gunakan *${usedPrefix}listmsg* untuk melihat daftar nya` 5 | let msgs = db.data.msgs 6 | if (!(text in msgs)) throw `'${text}' tidak terdaftar di daftar pesan` 7 | delete msgs[text] 8 | m.reply(`Berhasil menghapus pesan di daftar pesan dengan nama '${text}'`) 9 | } 10 | 11 | handler.menuowner = ['msg'].map(v => 'del' + v + ' <teks>') 12 | handler.tagsowner = ['owner'] 13 | handler.command = /^(delmsg|msgdel)$/i 14 | 15 | handler.owner = true 16 | 17 | export default handler 18 | -------------------------------------------------------------------------------- /plugins/others/msglist.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { usedPrefix, command }) => { 4 | let msgs = db.data.msgs 5 | let split = Object.entries(msgs).map(([nama, isi]) => { return { nama, ...isi } }) 6 | let fltr = split.map(v => '│◦❒ ' + v.nama).join('\n') 7 | 8 | m.reply(` 9 | ┌「 LIST PESAN 」 10 | ${fltr} 11 | └──── 12 | Akses/ambil dengan mengetik namanya 13 | `.trim()) 14 | } 15 | 16 | handler.menuowner = ['msg'].map(v => 'list' + v) 17 | handler.tagsowner = ['owner'] 18 | handler.command = /^(listmsg|msglist)$/i 19 | 20 | handler.owner = true 21 | 22 | export default handler 23 | -------------------------------------------------------------------------------- /plugins/others/primbonjadian.js: -------------------------------------------------------------------------------- 1 | import { Primbon } from '../../lib/scrape.js' 2 | 3 | const primbon = new Primbon() 4 | 5 | let handler = async (m, { conn, text, usedPrefix, command }) => { 6 | if (!text) throw `Usage : ${usedPrefix + command} tgl|bln|thn\n\nExample: *${usedPrefix + command} 20|06|2022*` 7 | let [l, r, s] = text.split`|` 8 | if (!l || isNaN(l)) throw `Input tanggal` 9 | if (!r || isNaN(r)) throw `Input bulan` 10 | if (!s || isNaN(s)) throw `Input tahun` 11 | try { 12 | let anu = await primbon.tanggal_jadian_pernikahan(l, r, s) 13 | if (!anu.status) throw new e() 14 | await m.reply(`*Tanggal :* ${anu.message.tanggal}\n\n*Karakteristik :*\n${anu.message.karakteristik}`) 15 | } catch (e) { 16 | console.log(e) 17 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 18 | } 19 | } 20 | 21 | handler.help = ['jadian <tgl>|<bln>|<thn>'] 22 | handler.tags = ['primbon'] 23 | handler.command = /^(jadian)$/i 24 | 25 | handler.premium = true 26 | handler.limit = true 27 | 28 | export default handler -------------------------------------------------------------------------------- /plugins/others/primbonjodoh.js: -------------------------------------------------------------------------------- 1 | import { Primbon } from '../../lib/scrape.js' 2 | 3 | const primbon = new Primbon() 4 | 5 | let handler = async (m, { conn, text, usedPrefix, command }) => { 6 | if (!text) throw `Usage : ${usedPrefix + command} name1|name2\n\nExample: *${usedPrefix + command} Tahu|Bacem*` 7 | let [l, r] = text.split`|` 8 | if (!l) throw `Input nama1` 9 | if (!r) throw `Input nama2` 10 | try { 11 | let anu = await primbon.kecocokan_nama_pasangan(l, r) 12 | if (!anu.status) throw new e() 13 | await m.reply(`*nama_anda :* ${anu.message.nama_anda}\n*nama_pasangan :* ${anu.message.nama_pasangan}\n\n*Sisi Positif :*\n${anu.message.sisi_positif}\n\n*Sisi Negatif :*\n${anu.message.sisi_negatif}`) 14 | } catch (e) { 15 | console.log(e) 16 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 17 | } 18 | } 19 | 20 | handler.help = ['jodoh <nama1>|<nama2>'] 21 | handler.tags = ['primbon'] 22 | handler.command = /^(jodoh)$/i 23 | 24 | handler.premium = true 25 | handler.limit = true 26 | 27 | export default handler -------------------------------------------------------------------------------- /plugins/others/primbonmimpi.js: -------------------------------------------------------------------------------- 1 | import { artimimpi } from '../../lib/scrape.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `Example: ${usedPrefix + command} Ular` 5 | try { 6 | let anu = await artimimpi(text) 7 | if (anu.length != 0) { 8 | let txt = `*Arti mimpi : ${text}*\n\n` 9 | for (var x of anu) { 10 | txt += `⭔ ${x}*\n\n` 11 | } 12 | m.reply(txt) 13 | } else { 14 | m.reply(`Tidak ditemukan tafsir mimpi *${text}*, cari dengan kata kunci yang lain.\nContoh : *${usedPrefix + command} ular*`) 15 | } 16 | } catch (e) { 17 | console.log(e) 18 | m.reply(`Fitur Error!`) 19 | } 20 | } 21 | 22 | handler.help = ['artimimpi <teks>'] 23 | handler.tags = ['primbon'] 24 | handler.command = /^((tafsir|arti)mimpi)$/i 25 | 26 | handler.premium = true 27 | handler.limit = true 28 | 29 | export default handler -------------------------------------------------------------------------------- /plugins/others/primbonnama.js: -------------------------------------------------------------------------------- 1 | import { Primbon } from '../../lib/scrape.js' 2 | 3 | const primbon = new Primbon() 4 | 5 | let handler = async (m, { conn, text, usedPrefix, command }) => { 6 | if (!text) throw `Example: ${usedPrefix + command} Andi` 7 | try { 8 | let anu = await primbon.arti_nama(text) 9 | if (!anu.status) throw new e() 10 | await m.reply(`*Nama :* ${anu.message.nama}\n*Arti :* ${anu.message.arti}`) 11 | } catch (e) { 12 | console.log(e) 13 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 14 | } 15 | } 16 | 17 | handler.help = ['artinama <teks>'] 18 | handler.tags = ['primbon'] 19 | handler.command = /^(artinama)$/i 20 | 21 | handler.premium = true 22 | handler.limit = true 23 | 24 | export default handler -------------------------------------------------------------------------------- /plugins/others/primbonweton.js: -------------------------------------------------------------------------------- 1 | import { Primbon } from '../../lib/scrape.js' 2 | 3 | const primbon = new Primbon() 4 | 5 | let handler = async (m, { conn, text, usedPrefix, command }) => { 6 | if (!text) throw `Usage : ${usedPrefix + command} tgl|bln|thn\n\nExample: *${usedPrefix + command} 20|06|2022*` 7 | let [l, r, s] = text.split`|` 8 | if (!l || isNaN(l)) throw `Input tanggal` 9 | if (!r || isNaN(r)) throw `Input bulan` 10 | if (!s || isNaN(s)) throw `Input tahun` 11 | try { 12 | let anu = await primbon.rejeki_hoki_weton(l, r, s) 13 | let anu2 = await primbon.pekerjaan_weton_lahir(l, r, s) 14 | let anu3 = await primbon.sifat_usaha_bisnis(l, r, s) 15 | if (!anu.status) throw new e() 16 | await m.reply(`*Hari Lahir :* ${anu.message.hari_lahir}\n\n*Rejeki :*\n${anu.message.rejeki}\n*Pekerjaan :*\n${anu2.message.pekerjaan}\n*Sifat Usaha Bisnis :*\n${anu3.message.usaha}`) 17 | } catch (e) { 18 | console.log(e) 19 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 20 | } 21 | } 22 | 23 | handler.help = ['weton <tgl>|<bln>|<thn>'] 24 | handler.tags = ['primbon'] 25 | handler.command = /^(weton)$/i 26 | 27 | handler.premium = true 28 | handler.limit = true 29 | 30 | export default handler -------------------------------------------------------------------------------- /plugins/others/privcmd.js: -------------------------------------------------------------------------------- 1 | import { plugins } from '../../lib/plugins.js' 2 | 3 | let handler = async (m, { usedPrefix }) => { 4 | let obj = Object.values(plugins) 5 | let all = [...new Set(obj.map(v => v = Object.keys(v)[0]))] 6 | let array = [] 7 | for (let x of all.filter(v => !/ef|ll|mm/i.test(v))) { 8 | await array.push(obj.filter(v => v[x] && !(v.disabled || v.premium || v.owner || v.ownerr || v.rowner || v.group || v.mods)).map(v => v[x]).flat()) 9 | } 10 | array = array.reduce((acc, e) => acc.concat(e), []).sort() 11 | let txt = `*Command Work in Private Chat :*\n\n⭔ Anonymous and Kerang Ajaib in *${usedPrefix}funmenu*\n⭔ All Commands in *${usedPrefix}genshinmenu*\n⭔ All Tools, check in *${usedPrefix}allmenu* at the bottom.\n` 12 | for (let x of array) { 13 | txt += '\n⭔ '+usedPrefix+x 14 | } 15 | await m.reply(txt) 16 | } 17 | 18 | handler.command = /^(priv(ate)?cmd)$/i 19 | 20 | export default handler -------------------------------------------------------------------------------- /plugins/owner/addowner.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | text = (text || '').split('|') 5 | let who = text[1] ? (text[1].replace(/\D/g, '') + '@s.whatsapp.net') : m.quoted ? m.quoted.sender : m.mentionedJid?.[0] ? m.mentionedJid[0] : '' 6 | if (!who) return m.reply(`Format : ${usedPrefix + command} nama | <tag / quote / ketik nmr nya>`) 7 | let meh = await conn.onWhatsApp(who) 8 | if (meh.length == 0) return m.reply(`[!] Failed, @${(who.split('@')[0] || '')} bukan pengguna WhatsApp.`, null, { mentions: [who] }) 9 | if (who == conn.user.jid) return m.reply(`[ ! ] Nomor Bot sudah otomatis menjadi owner.`) 10 | if (db.data.datas.owner.map(([number]) => number).includes(who.split('@')[0])) return m.reply('[ ! ] Dia sudah jadi owner.') 11 | if (db.data.datas.rowner.map(([number]) => number).includes(who.split('@')[0])) return m.reply('[ ! ] Dia sudah jadi real owner.') 12 | db.data.datas.owner.push([who.split('@')[0], text[0], true]) 13 | await conn.reply(m.chat, `Sukses menjadikan @${who.split('@')[0]} sebagai *owner*.`, m, { mentions: [who] }) 14 | } 15 | 16 | handler.menuowner = ['addowner'] 17 | handler.tagsowner = ['ownerr'] 18 | handler.command = /^(addowner)$/i 19 | 20 | handler.rowner = true 21 | 22 | export default handler 23 | 24 | -------------------------------------------------------------------------------- /plugins/owner/addprem.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | const cooldown = 86400000 4 | 5 | let handler = async (m, { conn, args, usedPrefix, command }) => { 6 | if (!args[0]) throw `Format : ${usedPrefix + command} <day> <@tag/quote>\n1 = 1 hari\n5 = 5 hari ... dst.\n\nContoh : *${usedPrefix + command} 10 @Alan*` 7 | if (isNaN(args[0])) return m.reply(`[!] Durasi harus dalam format angka.`) 8 | let who = args[1] ? (args[1].replace(/\D/g, '')+'@s.whatsapp.net') : m.quoted ? m.quoted.sender : m.mentionedJid ? m.mentionedJid[0] : '' 9 | if (!who) return m.reply(`Input nomor / @tag orangnya!`) 10 | let user = db.data.users 11 | let prems = db.data.datas.prems 12 | if (!user[who]) return m.reply(`[!] User tidak ada dalam database.`) 13 | if (prems.map(v => v.user).includes(who)) return m.reply(`*[ ! ] Dia sudah Premium.*`) 14 | let durasi = parseInt(args[0]) 15 | prems.push({user: who, date: new Date() * 1 + durasi * cooldown}) 16 | user[who].expired = +new Date() + durasi * cooldown 17 | await conn.reply(m.chat, `@${who.split('@')[0]} Menjadi User Premium.\n\n*Durasi : ${durasi} hari*`, m, { mentions: [who] }) 18 | } 19 | 20 | handler.menuowner = ['addprem <day> <@tag>'] 21 | handler.tagsowner = ['owner'] 22 | handler.command = /^(addprem(ium)?)$/i 23 | 24 | handler.rowner = true 25 | 26 | export default handler -------------------------------------------------------------------------------- /plugins/owner/backup.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | m.reply(`_[!] Wait, sending database. . ._`) 5 | try { 6 | await conn.sendMessage(m.sender, { document: fs.readFileSync('./database.json'), fileName: 'database.json', mimetype: 'application/json' }, { quoted: m }) 7 | await conn.sendMessage(m.sender, { document: await fs.readFileSync('./sessions/creds.json'), fileName: 'creds.json', mimetype: 'application/json' }, { quoted: m }) 8 | } catch (e) { 9 | console.log(e) 10 | m.reply('terjadi kesalahan, cek logs.') 11 | } 12 | } 13 | 14 | handler.menuowner = ['backup'] 15 | handler.tagsowner = ['owner'] 16 | handler.command = /^(backup(db|database)?)$/i 17 | 18 | handler.owner = true 19 | 20 | export default handler -------------------------------------------------------------------------------- /plugins/owner/banchat.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | const { proto } = await (await import('baileys')).default 3 | 4 | let handler = async (m, { args, conn }) => { 5 | let id = args[0] ? args[0] : m.isGroup ? m.chat : '' 6 | if (!id) throw `input group id !` 7 | let chat = db.data.chats[id] 8 | if (!chat) return m.reply(`[!] Invalid ID Group`) 9 | chat.isBanned = true 10 | chat.permaBan = true 11 | chat.spamcount = 0 12 | chat.lastmute = 0 13 | chat.mutecd = 0 14 | try { 15 | let msg = await conn.reply(id, 'Bot dalam mode nyimak.', m) 16 | let pin = db.data.chats[id].pinmsg 17 | pin['banchat'] = msg.key 18 | await conn.sendMsg(id, { pin: pin['banchat'], type: proto.PinInChat.Type['PIN_FOR_ALL'], time: 86400 }) 19 | } catch (e) { 20 | console.log(e) 21 | m.reply(e.message) 22 | } 23 | } 24 | 25 | handler.menuowner = ['banchat'] 26 | handler.tagsowner = ['owner'] 27 | handler.command = /^(banchat)$/i 28 | 29 | handler.owner = true 30 | 31 | export default handler -------------------------------------------------------------------------------- /plugins/owner/banuser.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, text }) => { 4 | let who = text ? text.replace(/[^0-9]/g, '') + '@s.whatsapp.net' : !m.isGroup ? m.chat : m.quoted ? m.quoted.sender : m.mentionedJid ? m.mentionedJid[0] : '' 5 | if (!who) throw 'Tag salah satu lah' 6 | let user = db.data.users[who] 7 | if (!user) throw `User tidak ada dalam database.` 8 | if (db.data.datas.rowner.map(([number]) => number).map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(who) || who == conn.user.jid) throw `[ ! ] Tidak dapat ban *real owner*.` 9 | if (user.bannedcd != 0) return conn.reply(m.chat, `[!] Tidak dapat ban @${(who || '').replace(/@s\.whatsapp\.net/g, '')} karena sudah di *silent*`, m, { mentions: [who] }) 10 | user.banned = true 11 | user.permaban = true 12 | user.spamcount = 0 13 | m.reply(`berhasil banned`) 14 | } 15 | 16 | handler.menuowner = ['ban @tag'] 17 | handler.tagsowner = ['owner'] 18 | handler.command = /^(ban(user)?)$/i 19 | 20 | handler.owner = true 21 | 22 | export default handler -------------------------------------------------------------------------------- /plugins/owner/broadcast.js: -------------------------------------------------------------------------------- 1 | import Connection from '../../lib/connection.js' 2 | import { delay, ranNumb } from '../../lib/func.js' 3 | 4 | let handler = async (m, { conn, text, usedPrefix, command }) => { 5 | let chats = Object.entries(Connection.store.chats).filter(([_, chat]) => chat.isChats && !_.startsWith('212')).map(v => v[0]) 6 | let img, q = m.quoted ? m.quoted : m 7 | let mime = (q.msg || q).mimetype || q.mediaType || '' 8 | if (!text) throw `teks nya mana ?` 9 | if (mime) img = await q.download?.() 10 | conn.reply(m.chat, `_Mengirim pesan broadcast ke ${chats.length} chat_`, m) 11 | let teks = `_*「 BroadCast-Bot 」*_${text ? ('\n\n'+text) : ''}` 12 | for (let id of chats) { 13 | try { 14 | if (/image|video/g.test(mime)) await conn.sendFile(id, img, '', teks, fkontakbot) 15 | else await conn.reply(id, teks, fkontakbot) 16 | } catch (e) { 17 | console.log(e) 18 | } 19 | await delay(ranNumb(3000, 7000)) 20 | } 21 | await m.reply('Selesai Broadcast All Chat :)') 22 | } 23 | 24 | handler.menuowner = ['bcall'] 25 | handler.tagsowner = ['owner'] 26 | handler.command = /^((broadcast|bc)(all|semua))$/i 27 | 28 | handler.owner = true 29 | 30 | export default handler -------------------------------------------------------------------------------- /plugins/owner/broadcastchat.js: -------------------------------------------------------------------------------- 1 | import Connection from '../../lib/connection.js' 2 | import { delay, ranNumb } from '../../lib/func.js' 3 | 4 | let handler = async (m, { conn, text, usedPrefix, command }) => { 5 | let chats = Object.entries(Connection.store.chats).filter(([_, chat]) => !jid.endsWith('@g.us') && !_.startsWith('212') && chat.isChats).map(v => v[0]) 6 | let img, q = m.quoted ? m.quoted : m 7 | let mime = (q.msg || q).mimetype || q.mediaType || '' 8 | if (!text) throw `teks nya mana ?` 9 | if (mime) img = await q.download?.() 10 | conn.reply(m.chat, `_Mengirim pesan broadcast ke ${chats.length} chat_`, m) 11 | let teks = `_*「 BroadCast-Bot 」*_${text ? ('\n\n'+text) : ''}` 12 | for (let id of chats) { 13 | try { 14 | if (/image|video/g.test(mime)) await conn.sendFile(id, img, '', teks, fkontakbot) 15 | else await conn.reply(id, teks, fkontakbot) 16 | } catch (e) { 17 | console.log(e) 18 | } 19 | await delay(ranNumb(3000, 6000)) 20 | } 21 | await m.reply('Selesai Broadcast All Private Chat :)') 22 | } 23 | 24 | handler.menuowner = ['bcprivate'] 25 | handler.tagsowner = ['owner'] 26 | handler.command = /^((bc|broadcast)(c|chats?|pc|private))$/i 27 | 28 | handler.owner = true 29 | 30 | export default handler -------------------------------------------------------------------------------- /plugins/owner/cash.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { delay } from '../../lib/func.js' 3 | 4 | let handler = async (m, { conn, text, usedPrefix, command }) => { 5 | if (!text || isNaN(text)) throw `Masukkan nominal !\n\nContoh : *${usedPrefix + command} 10000*` 6 | let awal = db.data.users[m.sender].money 7 | let awal2 = parseInt(awal) + parseInt(text) 8 | if (awal2 > 1000000000000000) throw `Kebanyakan` 9 | if (awal2 < 0) throw `Jangan sampai saldo minus.` 10 | db.data.users[m.sender].money += parseInt(text) 11 | await delay(500) 12 | if (text.includes('-')) { 13 | m.reply(`Anda menyetor sebesar ${text}\n\nSaldo 💵 : ${db.data.users[m.sender].money}`) 14 | } else { 15 | m.reply(`Sukses menarik uang.\n\nSaldo 💵 : ${db.data.users[m.sender].money}`) 16 | } 17 | } 18 | 19 | handler.menuowner = ['cash <nominal>'] 20 | handler.tagsowner = ['owner'] 21 | handler.command = /^(cash)$/i 22 | 23 | handler.owner = true 24 | 25 | export default handler -------------------------------------------------------------------------------- /plugins/owner/cleandb.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { format } from 'util' 3 | 4 | let handler = async (m, { conn, text, usedPrefix, command }) => { 5 | if (/list/.test(command)) { 6 | let list = await Object.keys(db.data.chats) 7 | let list2 = Object.keys(db.data.users) 8 | let txt = `*List Unused Groups*\n${format(list.filter(v => !v.endsWith('@g.us')))}\n\n` 9 | txt += `*List Unused Users*\n${format(list2.filter(v => !v.endsWith('@s.whatsapp.net')))}` 10 | m.reply(txt) 11 | } else { 12 | let list = Object.keys(db.data.users) 13 | let listgc = Object.keys(db.data.chats) 14 | for (let x of list) { if (!x.endsWith('@s.whatsapp.net')) delete db.data.users[x] } 15 | for (let x of listgc) { if (!x.endsWith('@g.us')) delete db.data.chats[x] } 16 | await m.reply('succes delete all unused data') 17 | } 18 | } 19 | 20 | handler.menuowner = ['cleandb','cleandblist'] 21 | handler.tagsowner = ['ownerr'] 22 | handler.command = /^(cleandb(list)?)$/i 23 | 24 | handler.rowner = true 25 | 26 | export default handler -------------------------------------------------------------------------------- /plugins/owner/clearsessions.js: -------------------------------------------------------------------------------- 1 | import { readdirSync, statSync, unlinkSync } from 'fs' 2 | import { join } from 'path' 3 | 4 | let handler = async (m, { conn, usedPrefix, args }) => { 5 | const sesi = ['./sessions'] 6 | const deletedFiles = [], array = [] 7 | sesi.forEach(dirname => { 8 | readdirSync(dirname).forEach(file => { 9 | if (file !== 'creds.json') array.push(join(dirname, file)) 10 | }) 11 | }) 12 | array.forEach(file => { 13 | const stats = statSync(file) 14 | if (stats.isDirectory()) { 15 | console.log(`Skipping directory: ${file}`) 16 | } else { 17 | unlinkSync(file) 18 | deletedFiles.push(file) 19 | } 20 | }) 21 | m.reply('sessions cleared!') 22 | } 23 | 24 | handler.menuowner = ['clearsessions'] 25 | handler.tagsowner = ['owner'] 26 | handler.command = /^(clearsess?i(ons?)?)$/i 27 | 28 | handler.owner = true 29 | 30 | export default handler -------------------------------------------------------------------------------- /plugins/owner/delowner.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, text }) => { 4 | let who = text ? (text.replace(/[@ .+-]/g, '') + '@s.whatsapp.net') : m.quoted ? m.quoted.sender : m.mentionedJid?.[0] ? m.mentionedJid[0] : '' 5 | if (!who) throw `tag atau ketik nomornya!` 6 | who = who.split('@')[0] 7 | let owners = db.data.datas.owner 8 | if (!owners.map(([number]) => number).map(v => v).includes(who)) return m.reply(`[ ! ] User tidak ada dalam list owner.`) 9 | db.data.datas.owner = owners.filter(([v]) => !v.includes(who)) 10 | await conn.reply(m.chat, `Menghapus @${who} dari list *owner*.`, m, { mentions: [who + '@s.whatsapp.net'] }) 11 | } 12 | 13 | handler.menuowner = ['delowner'] 14 | handler.tagsowner = ['ownerr'] 15 | handler.command = /^(del(ete)?owner)$/i 16 | 17 | handler.rowner = true 18 | 19 | export default handler 20 | 21 | -------------------------------------------------------------------------------- /plugins/owner/delownerr.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, text }) => { 4 | let who = text ? (text.replace(/[@ .+-]/g, '') + '@s.whatsapp.net') : m.quoted ? m.quoted.sender : m.mentionedJid?.[0] ? m.mentionedJid[0] : '' 5 | if (!who) throw `tag atau ketik nomornya!` 6 | who = who.split('@')[0] 7 | let owners = db.data.datas.rowner 8 | if (!owners.map(([number]) => number).map(v => v).includes(who)) return m.reply(`[ ! ] User tidak ada dalam list real owner.`) 9 | db.data.datas.rowner = owners.filter(([v]) => !v.includes(who)) 10 | await conn.reply(m.chat, `Menghapus @${who} dari list *real owner*.`, m, { mentions: [who + '@s.whatsapp.net'] }) 11 | } 12 | 13 | handler.menuowner = ['delrealowner'] 14 | handler.tagsowner = ['ownerr'] 15 | handler.command = /^(del(ete)?r(eal)?owner)$/i 16 | 17 | handler.rowner = true 18 | 19 | export default handler 20 | 21 | -------------------------------------------------------------------------------- /plugins/owner/delppbot.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | await conn.removeProfilePicture(conn.user.jid) 3 | m.reply('Sukses menghapus PP Bot.') 4 | } 5 | 6 | handler.menuowner = ['delppbot'] 7 | handler.tagsowner = ['owner'] 8 | handler.command = /^(del(botpp|ppbot))$/i 9 | 10 | handler.rowner = true 11 | 12 | export default handler -------------------------------------------------------------------------------- /plugins/owner/delprem.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | const cooldown = 86400000 4 | 5 | let handler = async (m, { conn, args }) => { 6 | let who 7 | if (m.isGroup) who = m.mentionedJid[0] ? m.mentionedJid[0] : m.quoted ? m.quoted.sender : args[0] ? args[0] : '' 8 | else who = m.quoted ? m.quoted.sender : args[0] ? args[0] : m.chat ? m.chat : '' 9 | if (!who) return m.reply(`tag orangnya!`) 10 | let user = db.data.users 11 | let prems = db.data.datas.prems 12 | who = who.replace(/\D/g,'') + '@s.whatsapp.net' 13 | if (!user[who]) return m.reply(`[!] User tidak ada dalam database.`) 14 | if (!prems.map(v => v.user).includes(who)) return m.reply(`[ ! ] User tidak ada dalam list premium.`) 15 | db.data.datas.prems = prems.filter(v => v.user !== who) 16 | user[who].expired = null 17 | await conn.reply(m.chat, `Menghapus @${(who || '').replace(/@s\.whatsapp\.net/g, '')} dari list user premium.`, m, { mentions: [who] }) 18 | } 19 | 20 | handler.menuowner = ['delprem <@tag>'] 21 | handler.tagsowner = ['owner'] 22 | handler.command = /^(del(ete)?prem(ium)?)$/i 23 | 24 | handler.rowner = true 25 | 26 | export default handler -------------------------------------------------------------------------------- /plugins/owner/enable.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { somematch } from '../../lib/func.js' 3 | 4 | let handler = async (m, { conn, usedPrefix, command, isOwner, args }) => { 5 | if (isOwner && m.isGroup) { 6 | if (!args[0] || !somematch(['on','off'], args[0].toLowerCase())) return m.reply(`Usage : ${usedPrefix + command} on / off\n\nExample : *${usedPrefix + command} on*`) 7 | if (command == 'antilink') { 8 | if (args[0] == 'on') { 9 | db.data.chats[m.chat].antiLink = true 10 | } else { 11 | db.data.chats[m.chat].antiLink = false 12 | } 13 | } else { 14 | if (args[0] == 'on') { 15 | db.data.chats[m.chat][`${command}`] = true 16 | } else { 17 | db.data.chats[m.chat][`${command}`] = false 18 | } 19 | } 20 | } 21 | } 22 | 23 | handler.command = /^(welcome|nsfw|game|antilink|antivirus)$/i 24 | 25 | export default handler -------------------------------------------------------------------------------- /plugins/owner/exec2.js: -------------------------------------------------------------------------------- 1 | import cp, { exec as _exec } from 'child_process' 2 | import { promisify } from 'util' 3 | 4 | let exec = promisify(_exec).bind(cp) 5 | let handler = async (m, { conn, isOwner, command, text }) => { 6 | if (conn.user.jid != conn.user.jid) return 7 | m.reply('Executing...') 8 | let o 9 | try { 10 | o = await exec(command.trimStart() + ' ' + text.trimEnd()) 11 | } catch (e) { 12 | o = e 13 | } finally { 14 | let { stdout, stderr } = o 15 | if (stdout.trim()) m.reply(stdout) 16 | if (stderr.trim()) m.reply(stderr) 17 | } 18 | } 19 | 20 | handler.customPrefix = /^[$] / 21 | handler.command = new RegExp 22 | 23 | handler.mods = true 24 | 25 | export default handler 26 | -------------------------------------------------------------------------------- /plugins/owner/join.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | let linkRegex = /chat.whatsapp.com\/([0-9A-Za-z]{20,24})( [0-9]{1,3})?/i 3 | const cooldown = 86400000 4 | 5 | let handler = async (m, { conn, text, isOwner }) => { 6 | if (db.data.settings[conn.user.jid].restrict) throw `[ RESTRICT ENABLED ]` 7 | let [_, code, expired] = text.match(linkRegex) || [] 8 | if (!code) throw 'Link invalid' 9 | try { 10 | let res = await conn.groupAcceptInvite(code) 11 | expired = Math.floor(Math.min(999, Math.max(1, isOwner ? isNumber(expired) ? parseInt(expired) : 0 : 3))) 12 | m.reply(`Berhasil join grup ${res}${expired ? ` selama ${expired} hari` : ''}`) 13 | let chats = db.data.chats[res] 14 | if (!chats) chats = db.data.chats[res] = {} 15 | if (expired) { 16 | chats.expired = +new Date() + expired * cooldown 17 | chats.joindate = new Date * 1 18 | chats.joincd = expired * cooldown 19 | } 20 | } catch (e) { 21 | console.log(e) 22 | m.reply(`Link expired / bot sudah di kick sebelumnya.`) 23 | } 24 | } 25 | 26 | handler.menuowner = ['join <chat.whatsapp.com>'] 27 | handler.tagsowner = ['owner'] 28 | handler.command = /^(join)$/i 29 | 30 | handler.owner = true 31 | 32 | export default handler 33 | 34 | const isNumber = (x) => (x = parseInt(x), typeof x === 'number' && !isNaN(x)) -------------------------------------------------------------------------------- /plugins/owner/leavegc.js: -------------------------------------------------------------------------------- 1 | import Connection from '../../lib/connection.js' 2 | import { delay } from '../../lib/func.js' 3 | 4 | let handler = async (m, { conn, args, command }) => { 5 | let chat = Object.keys(Connection.store.chats).filter(v => v.endsWith('g.us')) 6 | if (command.endsWith('all') || command.endsWith('semua')) { 7 | for (let id of chat) { // perulangan 8 | await conn.groupLeave(id) 9 | await delay(2000) // jeda 2 detik 10 | } 11 | await m.reply('Berhasil!') 12 | } else if (args[0] || args.length > 5) { 13 | let ada = chat.find(bot => bot == args[0]) // Apakah botnya ada disitu 14 | if (!ada) throw 'id salah/bot tidak ada digrup itu' 15 | await conn.groupLeave(args[0]) 16 | await m.reply('Berhasil!') 17 | } else { 18 | if (!m.isGroup) return global.dfail('group', m, conn) 19 | await conn.groupLeave(m.chat) 20 | } 21 | 22 | } 23 | 24 | handler.menuowner = ['gc', 'gcall', 'group'].map(v => 'leave' + v) 25 | handler.tagsowner = ['ownerr'] 26 | handler.command = /^(leaveg(c|ro?up)(all|semua)?)$/i 27 | 28 | handler.rowner = true 29 | 30 | export default handler -------------------------------------------------------------------------------- /plugins/owner/menfessdel.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async(m) => { 4 | let menfess = db.data.datas.menfess 5 | let a = Object.keys(menfess) 6 | if (a.length < 2000) throw `[ ! ] Data sampah menfess harus *di atas 2000*.\n\nData menfes sekarang : *${a.length}*` 7 | let half = await Math.floor(a.length / 2) 8 | a = a.slice(0, half) 9 | for (let x of a) { delete menfess[x] } 10 | await m.reply(`[ Sukses ]\n\nData menfess sekarang : *${a.length}* ${a.length > 2000 ? '( dapat dikurangi lagi )' : ''}`) 11 | } 12 | 13 | handler.menuowner = ['menfessdel'] 14 | handler.tagsowner = ['ownerr'] 15 | handler.command = /^(me(m|n)fess?del(ete)?|del(ete)?me(m|n)fess?)$/i 16 | 17 | handler.rowner = true 18 | 19 | export default handler -------------------------------------------------------------------------------- /plugins/owner/openaikey.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | let key = db.data.datas.openaikey 5 | if (command.includes('del')) { 6 | if (!text) throw `Masukkan OpenAIKey !` 7 | if (!key.includes(text)) throw `[!] Apikey tidak ada dalam List.\nCek dengan *${usedPrefix}listopenaikey*` 8 | key = key.filter(v => !v.includes(text)) 9 | db.data.datas.openaikey = key 10 | m.reply('Berhasil menghapus OpenAIKey') 11 | } else if (command.includes('add')) { 12 | if (!text) throw `Masukkan OpenAIKey !` 13 | if (key.includes(text)) throw `[!] Apikey sudah ada dalam list.` 14 | key.push(text) 15 | m.reply('Berhasil menambahkan OpenAIKey') 16 | } else { 17 | let txt = `*List OpenAI Key :*\n` 18 | for (let i of key) { txt += `\n${i}\n───────────────────` } 19 | m.reply(txt) 20 | } 21 | } 22 | 23 | handler.menuowner = ['add','del','list'].map(v => v + 'openaikey') 24 | handler.tagsowner = ['ownerr'] 25 | handler.command = /^((add|del(ete)?|(list)?)openaikey)$/i 26 | 27 | handler.rowner = true 28 | 29 | export default handler -------------------------------------------------------------------------------- /plugins/owner/pluginget.js: -------------------------------------------------------------------------------- 1 | /* 2 | if you want to read file in plugins folder, no need to write ".js" in the end of text 3 | example : .gp menu 4 | 5 | use ".js" ONLY if you want to acces other directory outside plugins folder 6 | example : .gp handler.js 7 | example : .gp lib/canvas.js 8 | */ 9 | 10 | import fs from 'fs' 11 | import path from 'path' 12 | 13 | let handler = async (m, { usedPrefix, command, text, __dirname }) => { 14 | if (!text) return m.reply(`Nama file nya apa ?\n\nContoh : *${usedPrefix + command} sc*`) 15 | let filename = path.join(__dirname, /\.[a-zA-Z0-9]+$/.test(text) ? `./../${text}` : `./${text}.js`) 16 | let listPlugins = fs.readdirSync(path.join(__dirname)).map(v => v.replace(/\.js/, '')) 17 | if (!fs.existsSync(filename)) return m.reply(`'${filename}' not found!\n${listPlugins.map(v => v).join('\n').trim()}`) 18 | m.reply(fs.readFileSync(filename, 'utf8')) 19 | } 20 | 21 | handler.menuowner = ['getplugin'] 22 | handler.tagsowner = ['mods'] 23 | handler.command = /^(gp|getplugin|pg|pluginget)$/i 24 | 25 | handler.mods = true 26 | 27 | export default handler -------------------------------------------------------------------------------- /plugins/owner/pluginsave.js: -------------------------------------------------------------------------------- 1 | import * as os from 'os' 2 | import fs from 'fs' 3 | import path from 'path' 4 | 5 | let handler = async (m, { usedPrefix, command, text, __dirname }) => { 6 | if (!text) return m.reply(`mau di save kemana ?\n\n*Contoh :*\n${usedPrefix + command} group/afk.js`) 7 | if (!m.quoted?.text) throw `balas pesan nya!` 8 | let dir = path.join(__dirname, /\.[a-zA-Z0-9]+$/.test(text) ? `./../${text}` : `./${text}.js`) 9 | try { 10 | let anu = fs.existsSync(dir) 11 | await fs.writeFileSync(dir, m.quoted.text) 12 | if (anu) m.reply(`saved in '${dir.replace(__dirname, `${os.platform() == 'win32' ? '\\' : '/'}plugins`)}'`) 13 | else m.reply(`*[new file created]*\n\nsaved in '${dir}'`) 14 | } catch (e) { 15 | console.log(e) 16 | throw `Error: ENOENT: no such file or directory, open '${dir}'` 17 | } 18 | } 19 | 20 | handler.menuowner = ['saveplugin'] 21 | handler.tagsowner = ['mods'] 22 | handler.command = /^((save|sf)(plugins?)?|pluginsave)$/i 23 | 24 | handler.mods = true 25 | 26 | export default handler -------------------------------------------------------------------------------- /plugins/owner/setauthor.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, command, text }) => { 4 | if (!text) return m.reply(`[!] Masukkan Nama Author.`) 5 | db.data.datas.author = text 6 | m.reply(`Author berhasil diset menjadi :\n*${text}*`) 7 | } 8 | 9 | handler.menuowner = ['setauthor'] 10 | handler.tagsowner = ['ownerr'] 11 | handler.command = /^(setauthor(name)?)$/i 12 | 13 | handler.rowner = true 14 | 15 | export default handler -------------------------------------------------------------------------------- /plugins/owner/setgroupname.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, command, text }) => { 4 | if (!text) return m.reply(`[!] Masukkan Nama Group.`) 5 | db.data.datas.maingroupname = text 6 | m.reply(`Fakename Group berhasil diset menjadi :\n${text}`) 7 | } 8 | 9 | handler.menuowner = ['setgcnamebot'] 10 | handler.tagsowner = ['ownerr'] 11 | handler.command = /^(set((gc|gro?up)name|name(gc|gro?up))bot)$/i 12 | 13 | handler.rowner = true 14 | 15 | export default handler -------------------------------------------------------------------------------- /plugins/owner/setlinkgc.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, command, text }) => { 4 | if (!text) return m.reply(`[!] Masukkan Link Group.`) 5 | db.data.datas.linkgc = text 6 | m.reply(`Link Group berhasil diset menjadi :\n${text}`) 7 | } 8 | 9 | handler.menuowner = ['setlinkgc'] 10 | handler.tagsowner = ['ownerr'] 11 | handler.command = /^(setlink(gro?up|gc)(bot)?)$/i 12 | 13 | handler.rowner = true 14 | 15 | export default handler -------------------------------------------------------------------------------- /plugins/owner/setpackname.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, command, text }) => { 4 | if (!text) return m.reply(`[!] Masukkan Nama Packname.`) 5 | db.data.datas.packname = text 6 | m.reply(`Packname berhasil diset menjadi :\n*${text}*`) 7 | } 8 | 9 | handler.menuowner = ['setpackname'] 10 | handler.tagsowner = ['ownerr'] 11 | handler.command = /^(setpackname)$/i 12 | 13 | handler.rowner = true 14 | 15 | export default handler -------------------------------------------------------------------------------- /plugins/owner/setteks.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `[ ! ] Input teks.` 5 | let p = db.data.datas 6 | if (command.includes('dona')) p.teksdonasi = text 7 | else if (command.includes('sewa')) p.tekssewa = text 8 | else p.tekstopup = text 9 | await m.reply(`Berhasil *${command} :*\n\n${text}`) 10 | } 11 | 12 | handler.menuowner = ['donasi','sewa','topup'].map(v => 'setteks' + v) 13 | handler.tagsowner = ['ownerr'] 14 | handler.command = /^(setteks(donasi|sewa(bot)?|topup))$/i 15 | 16 | handler.rowner = true 17 | 18 | export default handler -------------------------------------------------------------------------------- /plugins/owner/setteks2.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `[ ! ] Input teks.` 5 | if (text == 'default') text = '' 6 | db.data.datas.teksjadibot = text 7 | await m.reply(`Berhasil *${command} :*\n\n${text}`) 8 | } 9 | 10 | handler.menuowner = ['setteksjadibot'] 11 | handler.tagsowner = ['mods'] 12 | handler.command = /^(setteksjadibot)$/i 13 | 14 | handler.mods = true 15 | 16 | export default handler -------------------------------------------------------------------------------- /plugins/owner/unbanchat.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | const { proto } = await (await import('baileys')).default 3 | 4 | let handler = async (m, { text, conn }) => { 5 | let id = m.isGroup ? m.chat : text ? `${text.includes('@') ? text : text + '@g.us'}` : '' 6 | if (!id) return m.reply('[!] Gunakan di Grup / masukkan ID Grup') 7 | let chat = db.data.chats[id] 8 | if (!chat) return m.reply(`ID Grup tidak ada dalam database.`) 9 | chat.isBanned = false 10 | chat.permaBan = false 11 | chat.spamcount = 0 12 | chat.lastmute = 0 13 | chat.mutecd = 0 14 | try { 15 | await conn.reply(id, 'Bot dapat digunakan kembali.', m) 16 | let pin = db.data.chats[id].pinmsg 17 | if (pin['banchat']) { 18 | await conn.sendMsg(id, { pin: pin['banchat'], type: proto.PinInChat.Type['UNPIN_FOR_ALL'] }) 19 | delete pin['banchat'] 20 | } 21 | } catch (e) { 22 | console.log(e) 23 | m.reply(e.message) 24 | } 25 | } 26 | 27 | handler.menuowner = ['unbanchat'] 28 | handler.tagsowner = ['owner'] 29 | handler.command = /^(unbanchat)$/i 30 | 31 | handler.owner = true 32 | 33 | export default handler -------------------------------------------------------------------------------- /plugins/owner/unbanuser.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, text }) => { 4 | let who = text ? text.replace(/[^0-9]/g, '') + '@s.whatsapp.net' : !m.isGroup ? m.chat : m.quoted ? m.quoted.sender : m.mentionedJid ? m.mentionedJid[0] : '' 5 | if (!who) throw 'Tag salah satu lah' 6 | try { 7 | let user = db.data.users[who] 8 | user.banned = false 9 | user.permaban = false 10 | user.lastbanned = 0 11 | user.bannedcd = 0 12 | conn.reply(m.chat, `berhasil unbanned`, m) 13 | } catch (e) { 14 | console.log(e) 15 | m.reply(`User tidak ada dalam database.`) 16 | } 17 | } 18 | 19 | handler.menuowner = ['ban @tag'] 20 | handler.tagsowner = ['owner'] 21 | handler.command = /^(unban)$/i 22 | 23 | handler.owner = true 24 | 25 | export default handler -------------------------------------------------------------------------------- /plugins/rpg/banknabung.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { isNumber } from '../../lib/func.js' 3 | 4 | let handler = async (m, { conn, command, usedPrefix, args }) => { 5 | let user = db.data.users[m.sender] 6 | if (user.atm == 0) return m.reply(`[!] Anda belum memiliki ATM.\n\ngunakan command *${usedPrefix}atm create* untuk memproses.`) 7 | let total = Math.floor(isNumber(args[0]) ? Math.min(Math.max(parseInt(args[0]), 1), Number.MAX_SAFE_INTEGER) : 1) * 1 8 | if (command.includes('all')) total = user.money 9 | if ((user.money - total) > 0) { 10 | user.money -= total 11 | user.atm += total 12 | m.reply(`Sukses menabung sebesar ${total} Money 💹`) 13 | } else { 14 | m.reply(`[❗] Uang anda tidak mencukupi untuk menabung ${total} money 💹`) 15 | } 16 | } 17 | 18 | handler.menufun = ['nabung <jumlah>'] 19 | handler.tagsfun = ['rpg'] 20 | handler.command = /^((t|n)abung(all)?)$/i 21 | 22 | export default handler -------------------------------------------------------------------------------- /plugins/rpg/banknarik.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { isNumber, somematch } from '../../lib/func.js' 3 | 4 | let handler = async (m, { conn, command, usedPrefix, args }) => { 5 | let user = db.data.users[m.sender] 6 | if (user.atm == 0) return m.reply(`[!] Anda belum memiliki ATM.\n\ngunakan command *${usedPrefix}atm create* untuk memproses.`) 7 | if (somematch(['all', 'semua'], args[0])) args[0] = user.atm - 50000 8 | let total = Math.floor(isNumber(args[0]) ? Math.min(Math.max(parseInt(args[0]), 1), Number.MAX_SAFE_INTEGER) : 1) * 1 9 | if ((user.atm - total) >= 50000) { 10 | user.atm -= total 11 | user.money += total 12 | m.reply(`Sukses menarik sebesar ${total} Money 💹`) 13 | } else m.reply(`[❗] Rekening anda tidak mencukupi untuk menarik ${total} money 💹`) 14 | } 15 | 16 | handler.menufun = ['tarik <jumlah>'] 17 | handler.tagsfun = ['rpg'] 18 | handler.command = /^((t|n)arik(all)?)$/i 19 | 20 | export default handler -------------------------------------------------------------------------------- /plugins/rpg/buah.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, usedPrefix, text }) => { 4 | let user = db.data.users[m.sender] 5 | let txt = `[ *GUDANG BUAH KAMU* ]\n\n` 6 | txt += `🍌 ${user.pisang} Pisang\n` 7 | txt += `🍇 ${user.anggur} Anggur\n` 8 | txt += `🥭 ${user.mangga} Mangga\n` 9 | txt += `🍊 ${user.jeruk} Jeruk\n` 10 | txt += `🍎 ${user.apel} Apel\n\n` 11 | txt += `Gunakan command *${usedPrefix}sell* untuk menjual.` 12 | m.reply(txt) 13 | } 14 | 15 | handler.menufun = ['buah'] 16 | handler.tagsfun = ['rpg'] 17 | handler.command = /^((list)?(buah|fruits?))$/i 18 | 19 | export default handler -------------------------------------------------------------------------------- /plugins/rpg/daily.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | const rewards = { 4 | exp: 12000, 5 | money: 10000, 6 | potion: 5, 7 | } 8 | const cooldown = 86400000 9 | let handler = async (m) => { 10 | let user = db.data.users[m.sender] 11 | if (new Date - user.lastclaim < cooldown) throw `You have already claimed this daily claim!, wait for *${((user.lastclaim + cooldown) - new Date()).toTimeString()}*` 12 | let text = '' 13 | for (let reward of Object.keys(rewards)) { 14 | if (!(reward in user)) continue 15 | user[reward] += rewards[reward] 16 | text += `*+${rewards[reward]}* ${global.rpg.emoticon(reward)}${reward}\n` 17 | } 18 | m.reply(text.trim()) 19 | user.lastclaim = new Date * 1 20 | } 21 | 22 | handler.menufun = ['daily', 'claim'] 23 | handler.tagsfun = ['rpg'] 24 | handler.command = /^(daily|claim)$/i 25 | 26 | handler.cooldown = cooldown 27 | 28 | export default handler 29 | -------------------------------------------------------------------------------- /plugins/rpg/heal.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { isNumber } from '../../lib/func.js' 3 | 4 | let handler = async (m, { args, usedPrefix }) => { 5 | let user = db.data.users[m.sender] 6 | if (user.health >= 100) return m.reply(` 7 | Your ❤️health is full! 8 | `.trim()) 9 | const heal = 40 + (user.cat * 4) 10 | let count = Math.max(1, Math.min(Number.MAX_SAFE_INTEGER, (isNumber(args[0]) && parseInt(args[0]) || Math.round((100 - user.health) / heal)))) * 1 11 | if (user.potion < count) return m.reply(` 12 | Your 🥤Potion is not enough, you only have *${user.potion}* 🥤Potion 13 | type *${usedPrefix}buy potion ${count - user.potion}* to buy 🥤Potion 14 | `.trim()) 15 | user.potion -= count * 1 16 | user.health += heal * count 17 | m.reply(` 18 | Successful use of *${count}* 🥤Potion(s) 19 | `.trim()) 20 | } 21 | 22 | handler.menufun = ['heal'] 23 | handler.tagsfun = ['rpg'] 24 | handler.command = /^(heal)$/i 25 | 26 | export default handler -------------------------------------------------------------------------------- /plugins/rpg/kandang.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, usedPrefix }) => { 4 | let user = db.data.users[m.sender] 5 | let gmbrt = 'https://telegra.ph/file/295a6d5105771875e1797.jpg' 6 | let hsl = `*━━━━━ [ Kandang Buruan ] ━━━━━* 7 | 8 | *🐂 = [ ${user.banteng} ] banteng* 9 | *🐅 = [ ${user.harimau} ] harimau* 10 | *🐘 = [ ${user.gajah} ] gajah* 11 | *🐐 = [ ${user.kambing} ] kambing* 12 | *🐼 = [ ${user.panda} ] panda* 13 | *🐊 = [ ${user.buaya} ] buaya* 14 | *🐃 = [ ${user.kerbau} ] kerbau* 15 | *🐮 = [ ${user.sapi} ] sapi* 16 | *🐒 = [ ${user.monyet} ] monyet* 17 | *🐗 = [ ${user.babihutan} ] babihutan* 18 | *🐖 = [ ${user.babi} ] babi* 19 | *🐓 = [ ${user.ayam} ] ayam* 20 | 21 | Gunakan *${usedPrefix}sell* untuk dijual atau *${usedPrefix}cook* untuk dijadikan bahan masakan.` 22 | 23 | await conn.sendMsg(m.chat, { image: { url: gmbrt }, caption: hsl }, { quoted: m }).catch(_ => m.reply(hsl)) 24 | } 25 | 26 | handler.menufun = ['kandang'] 27 | handler.tagsfun = ['rpg'] 28 | handler.command = /^(kandang)$/i 29 | 30 | export default handler -------------------------------------------------------------------------------- /plugins/rpg/kolam.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn, usedPrefix }) => { 4 | let user = db.data.users[m.sender] 5 | let gmbrt = 'https://telegra.ph/file/4a2dad6f0f6dfef650bf3.jpg' 6 | let hsl = `*━━━━━ [ Kolam Ikan ] ━━━━━* 7 | 8 | *🐋 = [ ${user.orca} ] orca* 9 | *🐳 = [ ${user.paus} ] paus* 10 | *🐬 = [ ${user.lumba} ] lumba* 11 | *🦈 = [ ${user.hiu} ] hiu* 12 | *🐟 = [ ${user.ikan} ] ikan* 13 | *🐟 = [ ${user.lele} ] lele* 14 | *🐡 = [ ${user.bawal} ] bawal* 15 | *🐠 = [ ${user.nila} ] nila* 16 | *🦀 = [ ${user.kepiting} ] kepiting* 17 | *🦞 = [ ${user.lobster} ] lobster* 18 | *🐙 = [ ${user.gurita} ] gurita* 19 | *🦑 = [ ${user.cumi} ] cumi* 20 | *🦐 = [ ${user.udang} ] udang* 21 | 22 | Gunakan *${usedPrefix}sell* untuk dijual atau *${usedPrefix}cook* untuk dijadikan bahan masakan.` 23 | 24 | await conn.sendMsg(m.chat, { image: { url: gmbrt }, caption: hsl }, { quoted: m }).catch(_ => m.reply(hsl)) 25 | } 26 | 27 | handler.menufun = ['kolam'] 28 | handler.tagsfun = ['rpg'] 29 | handler.command = /^(kolam)$/i 30 | 31 | export default handler -------------------------------------------------------------------------------- /plugins/rpg/limit.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { promises } from 'fs' 3 | import { join } from 'path' 4 | import { xpRange } from '../../lib/levelling.js' 5 | import fs from 'fs' 6 | 7 | let handler = async (m, { conn, isPrems }) => { 8 | let { limit } = db.data.users[m.sender] 9 | let lemon 10 | if (isPrems) { 11 | lemon = `~ Infinity ~` 12 | } else { 13 | lemon = limit 14 | } 15 | await m.reply(`*「 LIMIT USER 」* 16 | sisa limit anda : ${lemon} 17 | 18 | 🍻NOTE : untuk mendapatkan limit, bisa dengan main games atau command *.buy* 🍻`) 19 | } 20 | 21 | handler.menufun = ['limit'] 22 | handler.tagsfun = ['rpg'] 23 | handler.command = /^(limit)$/i 24 | 25 | export default handler -------------------------------------------------------------------------------- /plugins/rpg/monthly.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | const rewards = { 4 | exp: 75000, 5 | money: 100000, 6 | potion: 12, 7 | wood: 12, 8 | rock: 12, 9 | string: 9, 10 | iron: 9, 11 | sand: 15, 12 | } 13 | 14 | const cooldown = 2592000000 15 | let handler = async (m) => { 16 | let user = db.data.users[m.sender] 17 | if (new Date - user.lastmonthly < cooldown) throw `You have already claimed this monthly claim, wait for *${((user.lastmonthly + cooldown) - new Date()).toTimeString()}*` 18 | let text = '' 19 | for (let reward of Object.keys(rewards)) if (reward in user) { 20 | user[reward] += rewards[reward] 21 | text += `*+${rewards[reward]}* ${rpg.emoticon(reward)}${reward}\n` 22 | } 23 | m.reply(text) 24 | user.lastmonthly = new Date * 1 25 | } 26 | 27 | handler.menufun = ['monthly'] 28 | handler.tagsfun = ['rpg'] 29 | handler.command = /^(monthly)$/i 30 | 31 | handler.cooldown = cooldown 32 | 33 | export default handler 34 | 35 | -------------------------------------------------------------------------------- /plugins/rpg/weekly.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | const rewards = { 4 | exp: 35000, 5 | money: 27000, 6 | potion: 7, 7 | wood: 4, 8 | rock: 4, 9 | string: 3, 10 | iron: 3, 11 | sand: 5, 12 | bibitmangga: 150, 13 | bibitapel: 150, 14 | bibitpisang: 150, 15 | bibitjeruk: 150, 16 | bibitanggur: 150, 17 | } 18 | const cooldown = 604800000 19 | let handler = async (m) => { 20 | let user = db.data.users[m.sender] 21 | if (new Date - user.lastweekly < cooldown) throw `You have already claimed this weekly claim!, wait for *${((user.lastweekly + cooldown) - new Date()).toTimeString()}*` 22 | let text = '' 23 | for (let reward of Object.keys(rewards)) { 24 | if (!(reward in user)) continue 25 | user[reward] += rewards[reward] 26 | text += `*+${rewards[reward]}* ${global.rpg.emoticon(reward)}${reward}\n` 27 | } 28 | m.reply(text.trim()) 29 | user.lastweekly = new Date * 1 30 | } 31 | 32 | handler.menufun = ['weekly'] 33 | handler.tagsfun = ['rpg'] 34 | handler.command = /^(weekly)$/i 35 | 36 | handler.cooldown = cooldown 37 | 38 | export default handler 39 | -------------------------------------------------------------------------------- /plugins/search/cekresi.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, text, usedPrefix }) => { 2 | if (!text) return m.reply(`Usage : ${usedPrefix + command} nomor_resi`) 3 | try { 4 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/checkresi?apikey=${api.lol}&resi=${text.trim()}`)).json() 5 | if (anu.status != 200) throw Error(anu.message) 6 | anu = anu.result 7 | let txt = `*Resi : ${anu.resi}*\n\n` 8 | + `*courier :* ${anu.courier}\n` 9 | + `*ori_name :* ${anu.origin.name}\n` 10 | + `*ori_add :* ${anu.origin.address}\n` 11 | + `*dest_name :* ${anu.destination.name}\n` 12 | + `*dest_add :* ${anu.destination.address}\n\n` 13 | + `*[ HISTORY ]*` 14 | for (let x of anu.history) { 15 | txt += `\n\n*time :* ${x.time}\n` 16 | txt += `*note :* ${x.note}` 17 | } 18 | m.reply(txt) 19 | } catch (e) { 20 | console.log(e) 21 | throw 'invalid no_resi / server down.' 22 | } 23 | } 24 | 25 | handler.help = ['cekresi <no_resi>'] 26 | handler.tags = ['searching'] 27 | handler.command = /^(cekresi)$/i 28 | 29 | export default handler -------------------------------------------------------------------------------- /plugins/search/drakor.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, text, usedPrefix }) => { 2 | if (!text) return m.reply(`Example: *${usedPrefix + command} heartbeat*`) 3 | if (text == 'ongoing') { 4 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/drakorongoing?apikey=${api.lol}`)).json() 5 | if (anu.status != 200) return m.reply('Internal server error') 6 | anu = anu.result 7 | let txt = `*Found ${anu.length} Result*` 8 | for (let x of anu) { 9 | txt += `\n\n*${x.title}*\n` 10 | txt +=`*year :* ${x.year}\n` 11 | txt +=`*episode :* ${x.total_episode}\n` 12 | txt += `*genre :* ${x.genre.join(', ')}\n` 13 | txt +=`_${x.link}_\n` 14 | txt += `───────────────────` 15 | } 16 | await conn.sendMsg(m.chat, { image: { url: anu[0].thumbnail }, caption: txt }, { quoted: m }).catch(_ => m.reply(txt)) 17 | } else { 18 | m.reply(`[ maintenance ]\n\n*${usedPrefix + command} ongoing* untuk melihat list ongoing`) 19 | } 20 | } 21 | 22 | handler.help = ['drakor ongoing','drakor <query>'] 23 | handler.tags = ['searching'] 24 | handler.command = /^(drakor)$/i 25 | 26 | export default handler -------------------------------------------------------------------------------- /plugins/search/google.js: -------------------------------------------------------------------------------- 1 | import googleIt from 'google-it' 2 | 3 | let handler = async (m, { conn, command, text, usedPrefix }) => { 4 | if (!text) throw `Example : ${usedPrefix + command} cara bikin bot` 5 | let anu = await googleIt({'query': text}) 6 | if (anu.length == 0) throw 'No Result Found.' 7 | let txt = `Found : ${text}` 8 | for (var x of anu) { 9 | txt += `\n\n*${x.title}*\n` 10 | txt += `${x.link}\n` 11 | txt += `_${x.snippet}_\n` 12 | txt += `───────────────────` 13 | } 14 | await m.reply(txt) 15 | } 16 | 17 | handler.help = ['google'].map(v => v + ' <teks>') 18 | handler.tags = ['searching'] 19 | handler.command = /^(googlef?)$/i 20 | 21 | export default handler -------------------------------------------------------------------------------- /plugins/search/googlereverse.js: -------------------------------------------------------------------------------- 1 | import uploadImage from '../../lib/uploadImage.js' 2 | 3 | let handler = async (m, { conn, command, text, usedPrefix }) => { 4 | let q = m.quoted ? m.quoted : m 5 | let mime = (q.msg || q).mimetype || q.mediaType || '' 6 | if (/imageM|image\/(jpe?g|png)/.test(mime)) { 7 | let img = await q.download() 8 | let out = await uploadImage(img) 9 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/googlereverse?apikey=${api.lol}&img=${out}`)).json() 10 | if (anu.status !== 200) return m.reply('Internal server error.') 11 | m.reply(`[ GOOGLE REVERSE SEARCH ]\n\n_${anu.result}_`) 12 | } else throw `Kirim Gambar Dengan Caption *${usedPrefix + command}*` 13 | } 14 | 15 | handler.help = ['googlereverse'] 16 | handler.tags = ['searching'] 17 | handler.command = /^(g(oogle)?reverse)$/i 18 | 19 | export default handler -------------------------------------------------------------------------------- /plugins/search/kbbi.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, text, usedPrefix }) => { 2 | if (!text) return m.reply(`Usage : ${usedPrefix + command} berenang`) 3 | try { 4 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/kbbi?apikey=${api.lol}&query=${text.trim()}`)).json() 5 | if (anu.status != 200) throw Error(anu.message) 6 | anu = anu.result[0] 7 | let txt = `*nama : ${anu.nama}*\n\n` 8 | + `*nomor :* ${anu.nomor}\n` 9 | + `*kata dasar :* ${anu.kata_dasar.length > 0 ? anu.kata_dasar.join(', ') : ''}\n` 10 | + `*pelafalan :* ${anu.pelafalan}\n` 11 | + `*bentuk tidak baku :* ${anu.bentuk_tidak_baku.length > 0 ? anu.bentuk_tidak_baku.join(', ') : ''}\n` 12 | + `*varian :* ${anu.varian.join(', ')}\n\n` 13 | + `*[ MAKNA ]*` 14 | for (let x of anu.makna) { 15 | txt += `\n\n*deskripsi :* ${x.kelas[0].deskripsi}\n` 16 | txt += `*submakna :* ${x.submakna.join(', ')}` 17 | txt += `${x.contoh.length > 0 ? `\n*contoh :*\n- ${x.contoh.join('\n- ')}` : ''}` 18 | txt += `\n───────────────────` 19 | } 20 | m.reply(txt) 21 | } catch (e) { 22 | console.log(e) 23 | throw 'kata tidak valid / server down.' 24 | } 25 | } 26 | 27 | handler.help = ['kbbi <text>'] 28 | handler.tags = ['searching'] 29 | handler.command = /^(kbbi)$/i 30 | 31 | export default handler -------------------------------------------------------------------------------- /plugins/search/npm.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { text }) => { 2 | if (!text) throw 'Input Package Name' 3 | let res = await fetch(`http://registry.npmjs.com/-/v1/search?text=${text}`) 4 | let { objects } = await res.json() 5 | if (!objects.length) throw `Query "${text}" not found :/` 6 | let txt = objects.map(({ package: pkg }) => { 7 | return `*${pkg.name}* (v${pkg.version})\n_${pkg.links.npm}_\n_${pkg.description}_` 8 | }).join`\n\n` 9 | m.reply(txt) 10 | } 11 | 12 | handler.help = ['npmsearch'] 13 | handler.tags = ['searching'] 14 | handler.command = /^(npm(js|search)?)$/i 15 | 16 | handler.premium = true 17 | handler.limit = true 18 | 19 | export default handler -------------------------------------------------------------------------------- /plugins/search/pinterest.js: -------------------------------------------------------------------------------- 1 | import { pinterest } from '../../lib/scrape.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command, isPrems }) => { 4 | if (!text) throw `Example : ${usedPrefix + command} spongebob` 5 | try { 6 | let anu = await (await fetch(`https://fastrestapis.fasturl.cloud/search/pinterest/simple?name=${text}`)).json() 7 | await conn.sendMsg(m.chat, { react: { text: '🔍', key: m.key } }) 8 | if (anu.status != 200) return m.reply('not found') 9 | anu = anu.result.getRandom() 10 | await conn.sendFile(m.chat, anu.directLink, '', anu.title || `*Search : ${text.trim()}*`, m) 11 | } catch (e) { 12 | console.log(e) 13 | m.reply('media tidak ditemukan') 14 | } 15 | } 16 | 17 | handler.help = ['pinterest <teks>'] 18 | handler.tags = ['searching'] 19 | handler.command = /^(pin(terest2?)?)$/i 20 | 21 | export default handler -------------------------------------------------------------------------------- /plugins/search/roboguru.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, command, text, usedPrefix }) => { 2 | if (!text) return m.reply(`Usage : ${usedPrefix + command} berenang`) 3 | try { 4 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/roboguru?apikey=${api.lol}&query=${text}&grade=sma&subject=sejarah`)).json() 5 | if (anu.status != 200) throw Error(anu.message) 6 | let txt = `*[ LIST PERTANYAAN ]*` 7 | for (let x of anu.result) { 8 | txt += `\n\n*tanya :* ${x.question.trim()}\n` 9 | txt += `*jawab :* ${x.answer.trim()}\n` 10 | txt += `───────────────────` 11 | } 12 | m.reply(txt) 13 | } catch (e) { 14 | console.log(e) 15 | throw 'Internal server error.' 16 | } 17 | } 18 | 19 | handler.help = ['roboguru <query>'] 20 | handler.tags = ['searching'] 21 | handler.command = /^(roboguru)$/i 22 | 23 | export default handler -------------------------------------------------------------------------------- /plugins/search/semoji.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs' 2 | import * as emoji from 'emoji-api' 3 | import { Sticker, StickerTypes } from 'wa-sticker-formatter' 4 | 5 | let handler = async (m, { conn, args, usedPrefix, command }) => { 6 | if (!args[0]) throw `Emojinya mana ?\n\nContoh : *${usedPrefix + command} 🤖*` 7 | let ztick = fs.readFileSync(`./media/sticker/bronya.webp`) 8 | try { 9 | let anu = args[1] ? await emoji.get(args[1]).twemoji() : await emoji.get(args[0]).twemoji() 10 | const sticker = new Sticker(anu, { pack: packname, author: author, type: StickerTypes.FULL }) 11 | const buffer = await sticker.toBuffer() 12 | await conn.sendFile(m.chat, buffer, '', '', m) 13 | } catch (e) { 14 | console.log(e) 15 | await conn.sendFile(m.chat, ztick, '', '', m) 16 | } 17 | } 18 | 19 | handler.help = ['semoji <emoji>'] 20 | handler.tags = ['searching'] 21 | handler.command = /^(s(tic?ker)?e?mojix?)$/i 22 | 23 | handler.premium = true 24 | handler.limit = true 25 | 26 | export default handler -------------------------------------------------------------------------------- /plugins/search/stikerlol.js: -------------------------------------------------------------------------------- 1 | import { delay } from '../../lib/func.js' 2 | import fs from 'fs' 3 | import { Sticker, StickerTypes } from 'wa-sticker-formatter' 4 | 5 | const bete = 'https://api.lolhuman.xyz/api/sticker' 6 | 7 | let handler = async (m, { conn, args, text, usedPrefix, command }) => { 8 | let res 9 | if (command.includes('gura')) { 10 | res = `${bete}/gawrgura?apikey=${api.lol}` 11 | } else if (command.includes('patrick') || command.includes('patrik')) { 12 | res = `${bete}/patrick?apikey=${api.lol}` 13 | } else { 14 | res = `${bete}/${command.replace(/s(tic?ker)?/, '').replace('bucin', 'bucinstick')}?apikey=${api.lol}` 15 | } 16 | let ztick = fs.readFileSync(`./media/sticker/bronya.webp`) 17 | try { 18 | const sticker = new Sticker(res, { pack: packname, author: author, type: StickerTypes.FULL }) 19 | const buffer = await sticker.toBuffer() 20 | await conn.sendFile(m.chat, buffer, '', '', m) 21 | } catch (e) { 22 | console.log(e) 23 | await conn.sendFile(m.chat, ztick, '', '', m) 24 | } 25 | } 26 | 27 | handler.help = ['anjing','bucin','gawrgura','patrick'].map(v => 'stiker' + v) 28 | handler.tags = ['searching'] 29 | handler.command = /^(s(tic?ker)?(anjing|bucin|(gawr?)?gura|patric?k))$/i 30 | 31 | handler.premium = true 32 | handler.limit = true 33 | 34 | export default handler -------------------------------------------------------------------------------- /plugins/search/yandexreverse.js: -------------------------------------------------------------------------------- 1 | import uploadImage from '../../lib/uploadImage.js' 2 | 3 | let handler = async (m, { conn, command, text, usedPrefix }) => { 4 | let q = m.quoted ? m.quoted : m 5 | let mime = (q.msg || q).mimetype || q.mediaType || '' 6 | if (/imageM|image\/(jpe?g|png)/.test(mime)) { 7 | let img = await q.download() 8 | let out = await uploadImage(img) 9 | let anu = await (await fetch(`https://api.lolhuman.xyz/api/reverseyandex?apikey=${api.lol}&img=${out}`)).json() 10 | if (anu.status !== 200) return m.reply('Internal server error.') 11 | m.reply(`[ YANDEX REVERSE SEARCH ]\n\n_${anu.result}_`) 12 | } else throw `Kirim Gambar Dengan Caption *${usedPrefix + command}*` 13 | } 14 | 15 | handler.help = ['yandexreverse'] 16 | handler.tags = ['searching'] 17 | handler.command = /^(yandexreverse)$/i 18 | 19 | export default handler -------------------------------------------------------------------------------- /plugins/tools/calculator.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text }) => { 2 | let id = m.chat 3 | conn.math = conn.math ? conn.math : {} 4 | if (id in conn.math) { 5 | clearTimeout(conn.math[id][3]) 6 | delete conn.math[id] 7 | m.reply('Hmmm...ngecheat?') 8 | } 9 | let val = text 10 | .replace(/[^0-9\-\/+*×÷πEe()piPI/]/g, '') 11 | .replace(/×/g, '*') 12 | .replace(/÷/g, '/') 13 | .replace(/π|pi/gi, 'Math.PI') 14 | .replace(/e/gi, 'Math.E') 15 | .replace(/\/+/g, '/') 16 | .replace(/\++/g, '+') 17 | .replace(/-+/g, '-') 18 | let format = val 19 | .replace(/Math\.PI/g, 'π') 20 | .replace(/Math\.E/g, 'e') 21 | .replace(/\//g, '÷') 22 | .replace(/\*×/g, '×') 23 | try { 24 | console.log(val) 25 | let result = (new Function('return ' + val))() 26 | if (!result) throw result 27 | m.reply(`*${format}* = _${result}_`) 28 | } catch (e) { 29 | if (e == undefined) throw 'Isinya?' 30 | throw 'Format salah, hanya 0-9 dan Simbol -, +, *, /, ×, ÷, π, e, (, ) yang disupport' 31 | } 32 | } 33 | 34 | handler.help = ['calculator <teks>'] 35 | handler.tags = ['tools'] 36 | handler.command = /^((c|k)al(c|k)u?(lator)?)$/i 37 | 38 | export default handler -------------------------------------------------------------------------------- /plugins/tools/database.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { plugins } from '../../lib/plugins.js' 3 | 4 | let handler = async (m) => { 5 | let totaluser = Object.keys(db.data.users).length 6 | let stats = Object.entries(db.data.stats).map(([key, val]) => { 7 | let name = Array.isArray(plugins[key]?.help) ? plugins[key]?.help?.join(' & ') : plugins[key]?.help || key 8 | if (/exec/.test(name)) return 9 | return { name, ...val } 10 | }) 11 | stats = await stats.filter(e => e).sort((a, b) => b.total - a.total) 12 | let cut = stats.slice(0, 3) 13 | let txt = `📊 *Database : ${totaluser} User*\n\n` 14 | txt += `*Command Digunakan :* ${stats.length}\n\n` 15 | txt += `*Paling sering digunakan :*` 16 | for (let i of cut) { 17 | txt += `\n*[ ${i.total} hit ]*` 18 | txt += `\n┗⊱ ${i.name.replaceAll('.js','')}` 19 | } 20 | await m.reply(txt) 21 | } 22 | 23 | handler.help = ['database'] 24 | handler.tags = ['tools'] 25 | handler.command = /^((view|lihat)?database)$/i 26 | 27 | export default handler -------------------------------------------------------------------------------- /plugins/tools/device.js: -------------------------------------------------------------------------------- 1 | import { getDevice } from 'baileys' 2 | 3 | let handler = async (m) => { 4 | m.reply(await getDevice(m.quoted ? m.quoted.id : m.key.id)) 5 | } 6 | 7 | handler.help = ['device'] 8 | handler.tags = ['tools'] 9 | handler.command = /^(device)$/i 10 | 11 | export default handler 12 | -------------------------------------------------------------------------------- /plugins/tools/downloadsw.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn }) => { 2 | if (m.quoted?.chat != 'status@broadcast') throw `Quote Pesan Status` 3 | let buffer = await m.quoted.download() 4 | await conn.sendFile(m.chat, buffer, '', m.quoted.text || '', null, false, { quoted: m }).catch(_ => m.reply(m.quoted.text || '')) 5 | } 6 | 7 | handler.help = ['downloadsw'] 8 | handler.tags = ['tools'] 9 | handler.command = /^((sw|status)(dl|download)|(dl|download)(sw|status))$/i 10 | 11 | export default handler -------------------------------------------------------------------------------- /plugins/tools/editmsg.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, usedPrefix, command }) => { 2 | if (!text) `masukkan teks` 3 | let q = m.quoted ? m.quoted : m 4 | let mime = (q.msg || q).mimetype || q.mediaType || '' 5 | if (!q.fromMe) throw `itu bukan pesan dari bot` 6 | if (/image|video/g.test(mime) && !/webp/g.test(mime) && q.text) { 7 | await conn.sendMessage(m.chat, { edit: { 8 | remoteJid: conn.user.jid, 9 | fromMe: true, 10 | id: q.id 11 | }, [/video/g.test(mime) ? 'video' : 'image']: Buffer.alloc(0), caption: text }) 12 | } else await conn.sendMessage(m.chat, { text: text, edit: q }) 13 | } 14 | 15 | handler.help = ['edit'] 16 | handler.tags = ['tools'] 17 | handler.command = /^(edit)$/i 18 | 19 | export default handler -------------------------------------------------------------------------------- /plugins/tools/emojimix.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | import { sticker } from '../../lib/sticker.js' 3 | import fs from 'fs' 4 | 5 | let handler = async (m, { conn, text, usedPrefix, command }) => { 6 | if (!text.includes('+')) throw `Usage : ${usedPrefix + command} emoji1|emoji2\n\nExample: *${usedPrefix + command} 😅+🤔*` 7 | let [l, r] = text.split`+` 8 | if (!l) throw 'emoji1 tidak boleh kosong' 9 | if (!r) throw 'emoji2 tidak boleh kosong' 10 | const res = await fetch(`https://tenor.googleapis.com/v2/featured?key=${db.data.datas.gapiskey}&contentfilter=high&media_filter=png_transparent&component=proactive&collection=emoji_kitchen_v5&q=${encodeURIComponent(l)}_${encodeURIComponent(r)}`) 11 | if (!res.ok) throw await res.text() 12 | let json = await res.json() 13 | if (!json.results) throw 'Error!' 14 | let ztick = fs.readFileSync(`./media/sticker/bronya.webp`) 15 | try { 16 | const stiker = await sticker(false, json.results[0].url, packname, author) 17 | await conn.sendFile(m.chat, stiker, '', '', m) 18 | } catch (e) { 19 | console.log(e) 20 | await conn.sendFile(m.chat, ztick, '', '', m) 21 | } 22 | } 23 | 24 | handler.help = ['emojimix <1>|<2>'] 25 | handler.tags = ['tools'] 26 | handler.command = /^(emojimix)$/i 27 | 28 | export default handler -------------------------------------------------------------------------------- /plugins/tools/getexif.js: -------------------------------------------------------------------------------- 1 | import { extractMetadata } from 'wa-sticker-formatter' 2 | 3 | let handler = async (m, { conn }) => { 4 | let q = m.quoted ? m.quoted : m 5 | let mime = (q.msg || q).mimetype || q.mediaType || '' 6 | if (m.quoted && /webp|sticker/g.test(mime)) { 7 | try { 8 | let img = await m.quoted.download() 9 | let metaData = await extractMetadata(img) 10 | await m.reply(JSON.stringify(metaData, null, 4)) 11 | } catch (e) { 12 | console.log(e) 13 | m.reply(`[!] Failed extract metadata sticker.`) 14 | } 15 | } else { 16 | m.reply(`Tag stikernya!`) 17 | } 18 | } 19 | 20 | handler.help = ['getexif'] 21 | handler.tags = ['tools'] 22 | handler.command = /^(getexif)$/i 23 | 24 | export default handler 25 | -------------------------------------------------------------------------------- /plugins/tools/halah.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, text, command, usedPrefix }) => { 2 | text = text ? text : m.quoted?.text ? m.quoted.text : '' 3 | if (!text) return m.reply('ngapain?') 4 | try { 5 | let vocal = command.charAt(1) 6 | await m.reply(text.toLowerCase().replace(/[aiueo]/gi, vocal)) 7 | } catch (e) { 8 | m.reply(e.message) 9 | } 10 | } 11 | 12 | handler.help = ['halah', 'hilih', 'huluh', 'heleh', 'holoh'] 13 | handler.tags = ['tools'] 14 | handler.command = /^(halah|hilih|huluh|heleh|holoh)$/i 15 | 16 | export default handler -------------------------------------------------------------------------------- /plugins/tools/readmore.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { conn, usedPrefix, command, text }) => { 2 | if (!text) throw `Usage :\n*${usedPrefix+command} text1 | text2*` 3 | let [l, r] = text.split`|` 4 | if (!r) r = '' 5 | m.reply(l + readMore + r) 6 | } 7 | 8 | handler.help = ['readmore <teks>|<teks>'] 9 | handler.tags = ['tools'] 10 | handler.command = /^(spoiler|hidetext|(read)?more|selengkapnya)$/i 11 | 12 | export default handler 13 | 14 | const more = String.fromCharCode(8206) 15 | const readMore = more.repeat(4001) -------------------------------------------------------------------------------- /plugins/tools/readviewonce.js: -------------------------------------------------------------------------------- 1 | import db from '../../lib/database.js' 2 | 3 | let handler = async (m, { conn }) => { 4 | let q = m.quoted ? m.quoted : m 5 | if (!q.viewOnce) throw 'Itu bukan pesan viewOnce' 6 | let txt = q.caption || '' 7 | try { 8 | let msg = q.message?.[Object.keys(q.message)[0]] || q.mediaMessage?.[Object.keys(q.mediaMessage)[0]] || null 9 | let rvo = db.data.datas.rvo 10 | let tes = rvo.find(v => v?.url == msg.url) 11 | if (tes) q.message = tes.msg 12 | await conn.sendFile(m.chat, await q.download(), '', txt, null, true, { mentions: conn.parseMention(txt), quoted: m }) 13 | } catch (e) { 14 | console.log(e) 15 | m.reply('already opened') 16 | } 17 | } 18 | 19 | handler.help = ['readviewonce'] 20 | handler.tags = ['tools'] 21 | handler.command = /^((read)?viewonce|rvo)$/i 22 | 23 | export default handler 24 | -------------------------------------------------------------------------------- /plugins/tools/smeme.js: -------------------------------------------------------------------------------- 1 | import uploadImage from '../../lib/uploadImage.js' 2 | import fs from 'fs' 3 | import { sticker } from '../../lib/sticker.js' 4 | 5 | let handler = async (m, { conn, text, usedPrefix, command }) => { 6 | let q = m.quoted ? m.quoted : m 7 | let mime = (q.msg || q).mimetype || q.mediaType || '' 8 | if (!/image\/(jpe?g|png|webp)/.test(mime)) throw `Tag gambar / stiker dengan caption *${usedPrefix + command} bawah|atas* atau tag gambar yang sudah dikirim` 9 | if (!text) throw `Usage : ${usedPrefix + command} text1|text2\n\nExample: *${usedPrefix + command} Shiro|Neko*` 10 | let [l, r] = text.split`|` 11 | if (!l) l = '-' 12 | if (!r) r = '-' 13 | let ztick = fs.readFileSync(`./media/sticker/bronya.webp`) 14 | let img = await q.download?.() 15 | let out = await uploadImage(img) 16 | try { 17 | let res = `https://api.memegen.link/images/custom/${encodeURIComponent(r)}/${encodeURIComponent(l)}.png?background=${out}` 18 | ztick = await sticker(false, res, packname, author) 19 | await conn.sendFile(m.chat, ztick, '', '', m) 20 | } catch (e) { 21 | console.log(e) 22 | await conn.sendFile(m.chat, ztick, '', '', m) 23 | } 24 | } 25 | 26 | handler.help = ['smeme <teks1>|<teks2>'] 27 | handler.tags = ['tools'] 28 | handler.command = /^(s(tic?ker)?meme)$/i 29 | 30 | export default handler -------------------------------------------------------------------------------- /plugins/tools/styletext.js: -------------------------------------------------------------------------------- 1 | import { styletext } from '../../lib/scrape.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | let teks = text ? text : m.quoted?.text ? m.quoted.text : '' 5 | if (!teks) throw `Example: *${usedPrefix + command} nama gwejh*` 6 | let anu = await styletext(teks) 7 | let txt = '' 8 | for (let x of anu) { 9 | txt += `*${x.name}*\n${x.result}\n\n` 10 | } 11 | await m.reply(txt) 12 | } 13 | 14 | handler.help = ['style'].map(v => v + ' <text>') 15 | handler.tags = ['tools'] 16 | handler.command = /^(style(text)?)$/i 17 | 18 | export default handler -------------------------------------------------------------------------------- /plugins/tools/toaksara.js: -------------------------------------------------------------------------------- 1 | import { latinToAksara } from '../../lib/scrape.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `Ubah Latin ke Aksara Jawa\n\nContoh :\n*${usedPrefix + command} halo rek*` 5 | try { 6 | let anu = await latinToAksara(text) 7 | m.reply(`*Hasil :*\n${anu}`) 8 | } catch (e) { 9 | console.log(e) 10 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 11 | } 12 | } 13 | 14 | handler.help = ['toaksara <teks>'] 15 | handler.tags = ['tools'] 16 | handler.command = /^((latin)?toaksara)$/i 17 | 18 | export default handler -------------------------------------------------------------------------------- /plugins/tools/tolatin.js: -------------------------------------------------------------------------------- 1 | import { aksaraToLatin } from '../../lib/scrape.js' 2 | 3 | let handler = async (m, { conn, text, usedPrefix, command }) => { 4 | if (!text) throw `Ubah Aksara Jawa ke Latin\n\nContoh :\n*${usedPrefix + command} ꦲꦭ꧀ꦭꦺꦴ​ꦫꦺꦏ꧀*` 5 | try { 6 | let anu = await aksaraToLatin(text) 7 | m.reply(`*Hasil :*\n${anu}`) 8 | } catch (e) { 9 | console.log(e) 10 | m.reply(`Terjadi kesalahan, coba lagi nanti.`) 11 | } 12 | } 13 | 14 | handler.help = ['tolatin <teks>'] 15 | handler.tags = ['tools'] 16 | handler.command = /^((aksara)?tolatin)$/i 17 | 18 | export default handler -------------------------------------------------------------------------------- /plugins/tools/tomp3.js: -------------------------------------------------------------------------------- 1 | import { toAudio } from '../../lib/converter.js' 2 | 3 | let handler = async (m, { conn, usedPrefix, command }) => { 4 | let q = m.quoted ? m.quoted : m 5 | let mime = (q.msg || q).mimetype || q.mediaType || '' 6 | if (/audio|video/.test(mime)) { 7 | try { 8 | let media = await q.download?.() 9 | if (/video/.test(mime)) media = await toAudio(media, 'mp4').then((data) => data.toBuffer()) 10 | await conn.sendFile(m.chat, media, `Convert by ${packname}.mp3`, '', m, /vn/.test(command) ? true : false, /mp3/.test(command) ? { asDocument: true } : {}, true) 11 | } catch (e) { 12 | console.log(e) 13 | m.reply(e.message) 14 | } 15 | } else throw `Reply video/audio with caption *${usedPrefix + command}*` 16 | } 17 | 18 | handler.help = ['toaudio','tomp3','tovn'].map(v => v+' (reply)') 19 | handler.tags = ['tools'] 20 | handler.command = /^(to(vn|a(udio)?|mp3))$/i 21 | 22 | export default handler -------------------------------------------------------------------------------- /plugins/tools/totalfitur.js: -------------------------------------------------------------------------------- 1 | import { plugins } from '../../lib/plugins.js' 2 | 3 | let handler = async (m) => { 4 | let count = 0 5 | let txt = `*[ FRACTION LIST ]*\n` 6 | let obj = Object.values(plugins) 7 | let all = [...new Set(obj.map(v => v = Object.keys(v)[0]))] 8 | for (let x of all.filter(v => !/ef|ll|mm/i.test(v))) { 9 | let cmd = obj.filter(v => v[x] && !v.disabled).map(v => v[x]).flat().length 10 | count += cmd 11 | txt += `\n*⭔ ${x.replace('help', 'Main Menu')} :* ${cmd} fitur` 12 | } 13 | txt += `\n\n*Total Fitur : ${count} Commands*` 14 | await m.reply(txt.replace(/menu/g, '')) 15 | } 16 | 17 | handler.help = ['totalfitur'] 18 | handler.tags = ['tools'] 19 | handler.command = /^(ft|total(ft?|fitur|cmd|command))$/i 20 | 21 | export default handler -------------------------------------------------------------------------------- /plugins/tools/tourl.js: -------------------------------------------------------------------------------- 1 | import uploadImage from '../../lib/uploadImage.js' 2 | import { niceBytes } from '../../lib/func.js' 3 | 4 | let handler = async (m, { usedPrefix, command }) => { 5 | let q = m.quoted ? m.quoted : m 6 | let mime = (q.msg || q).mimetype || q.mediaType || '' 7 | if (!mime || mime == 'conversation') return m.reply('apa yang mau di upload ?') 8 | let img = await q.download?.() 9 | let out = await uploadImage(img, true) 10 | if (!out) throw 'Gagal upload media.' 11 | if (typeof out === 'string' || out instanceof String) m.reply(`[ LINK ]\n${out}`) 12 | else { 13 | out = out.result 14 | let txt = `*[ File Uploaded ]*\n` 15 | + `\n*host :* ${out.host}` 16 | + `\n*file_name :* ${out.filename}` 17 | + `\n*file_size :* ${isNaN(out.filesize) ? out.filesize : niceBytes(out.filesize)}` 18 | + `\n*file_url :* _${out.url}_` 19 | m.reply(txt) 20 | } 21 | } 22 | 23 | handler.help = ['tourl','upload'] 24 | handler.tags = ['tools'] 25 | handler.command = /^(to(url|link)|upload)$/i 26 | 27 | handler.limit = true 28 | 29 | export default handler -------------------------------------------------------------------------------- /src/Aesthetic/.file: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/Aesthetic/Aesthetic_000.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/Aesthetic/Aesthetic_000.jpeg -------------------------------------------------------------------------------- /src/Aesthetic/Aesthetic_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/Aesthetic/Aesthetic_001.jpg -------------------------------------------------------------------------------- /src/Aesthetic/Aesthetic_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/Aesthetic/Aesthetic_002.jpg -------------------------------------------------------------------------------- /src/avatar_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/avatar_contact.png -------------------------------------------------------------------------------- /src/font/.file: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/font/212BabyGirl.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/212BabyGirl.otf -------------------------------------------------------------------------------- /src/font/212LeahleeSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/212LeahleeSans.ttf -------------------------------------------------------------------------------- /src/font/99HandWritting.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/99HandWritting.ttf -------------------------------------------------------------------------------- /src/font/ACallingFontDby7NTypes.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/ACallingFontDby7NTypes.otf -------------------------------------------------------------------------------- /src/font/ACasualHandwrittenPenNoncommercial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/ACasualHandwrittenPenNoncommercial.ttf -------------------------------------------------------------------------------- /src/font/ADayinSeptember.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/ADayinSeptember.otf -------------------------------------------------------------------------------- /src/font/ASMelanieHandwritting.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/ASMelanieHandwritting.ttf -------------------------------------------------------------------------------- /src/font/Alittlesunshine.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Alittlesunshine.ttf -------------------------------------------------------------------------------- /src/font/And-This-Happened.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/And-This-Happened.ttf -------------------------------------------------------------------------------- /src/font/AvenirCondensedHand.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/AvenirCondensedHand.ttf -------------------------------------------------------------------------------- /src/font/Avocados.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Avocados.ttf -------------------------------------------------------------------------------- /src/font/BabyDoll.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/BabyDoll.ttf -------------------------------------------------------------------------------- /src/font/BattleOfKingsRegular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/BattleOfKingsRegular.ttf -------------------------------------------------------------------------------- /src/font/BrayNotes.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/BrayNotes.ttf -------------------------------------------------------------------------------- /src/font/Convered-By-Your-Grace.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Convered-By-Your-Grace.ttf -------------------------------------------------------------------------------- /src/font/Edoms-Handwritting-Normal.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Edoms-Handwritting-Normal.ttf -------------------------------------------------------------------------------- /src/font/Futura Bold Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura Bold Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Bold font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura Bold font.ttf -------------------------------------------------------------------------------- /src/font/Futura Book Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura Book Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Book font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura Book font.ttf -------------------------------------------------------------------------------- /src/font/Futura Extra Black font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura Extra Black font.ttf -------------------------------------------------------------------------------- /src/font/Futura Heavy Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura Heavy Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Heavy font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura Heavy font.ttf -------------------------------------------------------------------------------- /src/font/Futura Light Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura Light Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura Light font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura Light font.ttf -------------------------------------------------------------------------------- /src/font/Futura Medium Italic font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura Medium Italic font.ttf -------------------------------------------------------------------------------- /src/font/Futura XBlk BT.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura XBlk BT.ttf -------------------------------------------------------------------------------- /src/font/Futura-CondensedLight.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Futura-CondensedLight.otf -------------------------------------------------------------------------------- /src/font/GloriaHallelujah-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/GloriaHallelujah-Regular.ttf -------------------------------------------------------------------------------- /src/font/HandwritingCR-2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/HandwritingCR-2.ttf -------------------------------------------------------------------------------- /src/font/Kempton-Demo-Handwritting.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Kempton-Demo-Handwritting.ttf -------------------------------------------------------------------------------- /src/font/MyHandsareHoldingYou.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/MyHandsareHoldingYou.ttf -------------------------------------------------------------------------------- /src/font/My_handwriting.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/My_handwriting.ttf -------------------------------------------------------------------------------- /src/font/Nadeznas-Handwritting.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Nadeznas-Handwritting.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-Black.ttf -------------------------------------------------------------------------------- /src/font/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-Bold.ttf -------------------------------------------------------------------------------- /src/font/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-Italic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-Light.ttf -------------------------------------------------------------------------------- /src/font/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-Medium.ttf -------------------------------------------------------------------------------- /src/font/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-Regular.ttf -------------------------------------------------------------------------------- /src/font/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-Thin.ttf -------------------------------------------------------------------------------- /src/font/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /src/font/ShadowsIntoLight-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/ShadowsIntoLight-Regular.ttf -------------------------------------------------------------------------------- /src/font/Zahraaa.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/Zahraaa.ttf -------------------------------------------------------------------------------- /src/font/angelina.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/angelina.ttf -------------------------------------------------------------------------------- /src/font/futur.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/futur.ttf -------------------------------------------------------------------------------- /src/font/futura light bt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/futura light bt.ttf -------------------------------------------------------------------------------- /src/font/futura medium bt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/futura medium bt.ttf -------------------------------------------------------------------------------- /src/font/futura medium condensed bt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/futura medium condensed bt.ttf -------------------------------------------------------------------------------- /src/font/level_c.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/level_c.otf -------------------------------------------------------------------------------- /src/font/michellehandwritting.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/michellehandwritting.ttf -------------------------------------------------------------------------------- /src/font/texts.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/font/texts.otf -------------------------------------------------------------------------------- /src/kertas/.file: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/kertas/magernulis1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/kertas/magernulis1.jpg -------------------------------------------------------------------------------- /src/level_c.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/level_c.otf -------------------------------------------------------------------------------- /src/lvlup_template.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/lvlup_template.jpg -------------------------------------------------------------------------------- /src/squidGame_GLRL.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/squidGame_GLRL.mp3 -------------------------------------------------------------------------------- /src/squidGame_GLRL_Scan.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/squidGame_GLRL_Scan.mp3 -------------------------------------------------------------------------------- /src/squidGame_GLRL_Shoot.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/squidGame_GLRL_Shoot.mp3 -------------------------------------------------------------------------------- /src/texts.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/src/texts.otf -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs' 2 | import path, { dirname } from 'path' 3 | import assert from 'assert' 4 | import { spawn } from 'child_process' 5 | import syntaxError from 'syntax-error' 6 | import { fileURLToPath } from 'url' 7 | import { createRequire } from 'module' 8 | 9 | const __filename = fileURLToPath(import.meta.url) 10 | const __dirname = dirname(__filename) 11 | const require = createRequire(__dirname) 12 | 13 | let folders = ['.', ...Object.keys(require(path.join(__dirname, './package.json')).directories)] 14 | let files = [] 15 | for (let folder of folders) 16 | for (let file of fs.readdirSync(folder).filter(v => v.endsWith('.js'))) 17 | files.push(path.resolve(path.join(folder, file))) 18 | for (let file of files) { 19 | if (file == __filename) continue 20 | console.error('Checking', file) 21 | const error = syntaxError(fs.readFileSync(file, 'utf8'), file, { 22 | sourceType: 'module', 23 | allowReturnOutsideFunction: true, 24 | allowAwaitOutsideFunction: true 25 | }) 26 | if (error) assert.ok(error.length < 1, file + '\n\n' + error) 27 | assert.ok(file) 28 | console.log('Done', file) 29 | } -------------------------------------------------------------------------------- /tmp/.file: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /views/img/dark/.file: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /views/img/dark/balloon_centered_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_centered_normal.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_centered_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_centered_pressed.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_centered_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_centered_shadow.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_incoming_normal.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_incoming_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_incoming_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_incoming_pressed.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_incoming_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_incoming_pressed_ext.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_live_location_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_live_location_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_live_location_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_live_location_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_outgoing_normal.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_outgoing_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_outgoing_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_outgoing_pressed.9.png -------------------------------------------------------------------------------- /views/img/dark/balloon_outgoing_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/dark/balloon_outgoing_pressed_ext.9.png -------------------------------------------------------------------------------- /views/img/light/.file: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /views/img/light/balloon_centered_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_centered_normal.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_centered_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_centered_pressed.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_centered_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_centered_shadow.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_incoming_normal.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_incoming_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_incoming_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_incoming_pressed.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_incoming_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_incoming_pressed_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_live_location_incoming_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_live_location_incoming_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_live_location_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_live_location_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_outgoing_frame.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_outgoing_normal.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_normal_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_outgoing_normal_ext.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_normal_stkr.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_outgoing_normal_stkr.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_outgoing_pressed.9.png -------------------------------------------------------------------------------- /views/img/light/balloon_outgoing_pressed_ext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clicknetcafe/avalon-md/458fa1780e575a7cd1c6d656bf688f36a3da4cde/views/img/light/balloon_outgoing_pressed_ext.9.png -------------------------------------------------------------------------------- /views/index.html: -------------------------------------------------------------------------------- 1 | <html> 2 | <head> 3 | <title>Web 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 | -------------------------------------------------------------------------------- /views/index.js: -------------------------------------------------------------------------------- 1 | window.onload = () => { 2 | let chat = document.querySelector('div.container-fluid') 3 | function addMsg(obj) { 4 | let html = document.createElement('span') 5 | html.className = 'msg' 6 | html.innerHTML = obj 7 | chat.appendChild(html) 8 | } 9 | 10 | window.onclick = () => addMsg(12) 11 | } 12 | -------------------------------------------------------------------------------- /views/style.css: -------------------------------------------------------------------------------- 1 | span.msg { 2 | } 3 | 4 | --------------------------------------------------------------------------------