Logo OmniDevvKANA Web
Kembali ke katalog plugin

main

hello

Kirim mini game HTML contoh

Send the sample HTML mini game

plugins/main/game.js

Lokasi file di repo kana-md

1

Perintah termasuk alias

0.9 KB

Ukuran file sumber

4/11/2026

Update terakhir, commit 05d4f1b

Daftar perintah

Ketuk tombol salin untuk menyalin perintah, lalu tempel di chat WhatsApp bot KANA.

.hello

Cara pakai

.hello

Contoh

.hello

Kode sumber plugin

Unduh .js

Cara pasang: simpan file ini ke folder plugins/main/ di bot KANA kamu, lalu restart bot. Pemilik source code lain bisa mengambil update plugin terbaru dari halaman ini kapan saja.

import { fileURLToPath } from 'node:url'
import { dirname, join } from 'node:path'
import { sendHtmlGame } from '../../src/ui/htmlgame.js'

export const config = {
  name: 'hello',
  alias: [],
  category: 'main',
  description: { id: 'Kirim mini game HTML contoh', en: 'Send the sample HTML mini game' },
  usage: '.hello',
  example: '.hello',
  cooldown: 10,
}

export const i18n = {
  id: { hello: { label: 'Mini game contoh dari KANA. Di luar Android, game tampil sebagai label teks saja ya~' } },
  en: { hello: { label: 'Sample mini game from KANA. Outside Android, the game shows as a text label only~' } },
}

const here = dirname(fileURLToPath(import.meta.url))

export const test = { input: '.hello', expect: /mini game/i }

export async function handler(ctx) {
  await sendHtmlGame(ctx.sock, ctx.chat, join(here, '../../games/hello/index.html'), {
    title: 'KANA',
    label: ctx.t('hello.label'),
    height: 360,
  })
}