Sixseveen
Feb 13th, 2026
6
0
Never
This is comment for paste wacap ht poll
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import crypto from 'node:crypto'
  2.  
  3. /** @param {import('../../core/type/plugin.js').HandlerParams} */
  4.  
  5. async function plugin({ sock, jid, text, m, q, prefix, command, other }) {
  6.  
  7.  
  8. /* dapetin dulu semua lid di grup, ini adalah bekal senjata lu buat hidetag
  9. ini adalah cara gw, yap gw groupMetadatanya langsung konek ke socket,
  10. jadi kalau buat dapetin all member lids cukup gw ambil dari socket,
  11. gw yakin tiap sc beda" cara simpen cache metadatanya, gw serahin ke lu
  12. masing masing".. intinya variabel allMemberLid berisi array of string
  13. kaya ini [1213@lid, 113242@lid, dst...]
  14. */
  15.  
  16. const gm = await sock.ws.config.cachedGroupMetadata(jid)
  17. const allMemberLid = gm.participants.map(m => m.id)
  18.  
  19. // main code, lu cuma peduli 1 function ini
  20. await sock.relayMessage(jid, {
  21. messageContextInfo: {
  22. messageSecret: crypto.randomBytes(32).toString("base64") // isinya kayak gini kita kira, lu bs pakek apa aja, gw import crypto "SvNuWDSXOMsnm6kO2p0EL8KRm48iECIJfdrwpjAo7EE="
  23. },
  24. pollCreationMessageV3: {
  25. contextInfo: {
  26. mentionedJid: allMemberLid // yg gw bilang tadi, array of string yg isinya lid yg mau lu hide tag
  27. },
  28.  
  29. options: [
  30. {
  31. optionName: "worek.. jangan ht lagi 😡"
  32. },
  33. {
  34. optionName: "enggak"
  35. }
  36. ],
  37. name: "ges maaf HT T^T cuma mau coba poll ht nya work kah?", // judul poling lu
  38. selectableOptionsCount: 1 // 0 = bisa pilih banyak opsi, 1 = hanya boleh pilih 1 opsi
  39. }
  40. }, {
  41. // gw gak tau ini apa, wajib isi, kalau gk isi ya gk muncul polling nyah :v
  42. additionalNodes: [{
  43. tag: 'meta',
  44. attrs: {
  45. polltype: 'creation'
  46. }
  47. }]
  48. })
  49.  
  50. // dah gitu aja
  51. }
  52.  
  53. plugin.title = 'ht polling'
  54. plugin.command = ['htpoll']
  55. plugin.category = ['?']
  56. plugin.description = 'tutorial hidetag polling'
  57.  
  58. export default plugin
Add Comment
Please, Sign In to add comment