castleys-community
v1.0.4
Published
Baileys helper untuk kirim group/community status — text, image, video, audio, hex background, custom audience
Maintainers
Readme
castleys-community
Baileys helper untuk kirim group/community status (groupStatusMessageV2).
by ren-offc
Install
npm i castleys-communityUsage
import { groupStatusV2 } from 'castleys-community'
// Text
await groupStatusV2(sock, jid, {
text: 'Halo guys!',
background: '#1B5E20',
color: '#FFFFFF',
font: 5
})
// Image
await groupStatusV2(sock, jid, {
image: buffer,
caption: 'Caption nih'
})
// Video
await groupStatusV2(sock, jid, {
video: buffer,
caption: 'Video nih'
})
// Audio
await groupStatusV2(sock, jid, {
audio: buffer,
ptt: true
})
// Custom audience (ganti "Kata Teman Dekat")
await groupStatusV2(sock, jid, {
text: 'Buat geng doang',
background: '#4CAF50',
audience: { type: 'custom', name: 'Geng', emoji: '🔥' }
})
// Close friends
await groupStatusV2(sock, jid, {
text: 'Buat close friends',
audience: 'close_friends'
})Class API
import GroupStatus from 'castleys-community'
const gs = new GroupStatus(sock)
await gs.send(jid, { text: 'Test', background: '#388E3C' })Options
| Key | Type | Keterangan |
|---|---|---|
| text | string | Isi teks |
| background | string | Hex warna background #RRGGBB |
| color | string | Hex warna teks #RRGGBB |
| font | number | Font WA 0–6 |
| image | Buffer / URL | Gambar |
| video | Buffer / URL | Video |
| audio | Buffer / URL | Audio |
| caption | string | Caption media |
| ptt | boolean | Push-to-talk audio (default true) |
| audience | string / object | 'close_friends' atau { type: 'custom', name, emoji } |
