Kembali ke katalog plugin
fun
bola8
Tanya bola ajaib 8 untuk jawaban acak seru
Ask the magic 8 ball for a fun random answer
plugins/fun/bola8.js
Lokasi file di repo kana-md
2
Perintah termasuk alias
3.2 KB
Ukuran file sumber
4/11/2026
Update terakhir, commit 44f4010
Daftar perintah
Ketuk tombol salin untuk menyalin perintah, lalu tempel di chat WhatsApp bot KANA.
.bola8.8ballCara pakai
.bola8 <pertanyaan>
Contoh
.bola8 apakah hari ini beruntung?
Kode sumber plugin
Cara pasang: simpan file ini ke folder plugins/fun/ di bot KANA kamu, lalu restart bot. Pemilik source code lain bisa mengambil update plugin terbaru dari halaman ini kapan saja.
import { sendButtons } from '../../src/ui/buttons.js'
export const config = {
name: 'bola8',
alias: ['8ball'],
category: 'fun',
description: { id: 'Tanya bola ajaib 8 untuk jawaban acak seru', en: 'Ask the magic 8 ball for a fun random answer' },
usage: '.bola8 <pertanyaan>',
example: '.bola8 apakah hari ini beruntung?',
cooldown: 3,
}
export const i18n = {
id: {
bola8: {
usage: 'Tulis pertanyaannya dulu yaa, contoh: .bola8 apakah hari ini beruntung?~ ๐ฎ',
title: 'Bola Ajaib KANA ๐ฎ',
answer: 'Pertanyaan: {question}\nJawaban bola ajaib: {answer} โจ\n\n{disclaimer}',
disclaimer: 'Catatan kecil: ini cuma hiburan yaa, jangan dijadiin keputusan hidup~ (โงโฝโฆ)',
btnAgain: 'Tanya Lagi',
btnMenu: 'Menu Fun',
answers: [
'Iyaa, pasti itu~ โจ',
'Kayaknya sih iya, bintang-bintang setuju~ ๐',
'Hmm, tanda-tandanya bagus, lanjut aja~ ๐',
'Bola ajaib bilang: gas, jangan ragu~ (โขฬแดโขฬ)ู',
'Bisa jadi... tapi tanya hatimu juga ya~ ๐ธ',
'Kaboel, eh maksudnya kabur jawabannya, coba tanya lagi nanti~ ๐ญ',
'Sstt, bola ajaib lagi ngantuk, jawabannya belum jelas~ ๐ด',
'Kayaknya belum waktunya deh~ โณ',
'Hmm, peluangnya tipis nih... (โฅ๏นโฅ)',
'Bola ajaib geleng-geleng: nggak dulu yaa~ ๐',
'Jangan deh, kata bola ajaib mending cari jalan lain~ โจ',
'Ehh, jawabannya: ntar dulu, pikir lagi baik-baik~ ๐ค',
],
},
},
en: {
bola8: {
usage: 'Write your question first, example: .bola8 will today be lucky?~ ๐ฎ',
title: 'KANA Magic Ball ๐ฎ',
answer: 'Question: {question}\nMagic ball says: {answer} โจ\n\n{disclaimer}',
disclaimer: 'Small note: this is just for fun, do not make life decisions from it~ (โงโฝโฆ)',
btnAgain: 'Ask Again',
btnMenu: 'Fun Menu',
answers: [
'Yes, definitely~ โจ',
'Looks like yes, the stars agree~ ๐',
'Hmm, signs are good, go for it~ ๐',
'The magic ball says: go, do not hesitate~ (โขฬแดโขฬ)ู',
'Could be... but ask your heart too~ ๐ธ',
'The answer is hiding in fog, ask again later~ ๐ญ',
'Shh, the ball is sleepy, the answer is unclear~ ๐ด',
'Seems like not the right time yet~ โณ',
'Hmm, the chances look thin... (โฅ๏นโฅ)',
'The ball shakes its head: not this time~ ๐',
'Better not, the ball suggests another path~ โจ',
'Eh, the answer is: wait, think it over first~ ๐ค',
],
},
},
}
export const test = { input: '.bola8 apakah hari ini cerah?', expect: /bola ajaib/i }
export async function handler(ctx) {
const question = ctx.text.trim()
if (!question) return ctx.reply(ctx.t('bola8.usage'))
const pool = i18n[ctx.lang]?.bola8?.answers ?? i18n.id.bola8.answers
const answer = pool[Math.floor(Math.random() * pool.length)]
const body = ctx.t('bola8.answer', { question, answer, disclaimer: ctx.t('bola8.disclaimer') })
return sendButtons(ctx.sock, ctx.chat, {
title: ctx.t('bola8.title'),
body,
footer: ctx.t('menu.footer'),
replies: [
{ text: ctx.t('bola8.btnAgain'), id: `.bola8 ${question.slice(0, 60)}` },
],
textFallback: body,
})
}
