arugaz / whatsapp-bot

Whatsapp Bot Multi Device - Node Js - Internationalization
GNU General Public License v3.0
596 stars 785 forks source link

[REQ] Anti view once for direct message #494

Closed rivai45 closed 7 months ago

rivai45 commented 7 months ago

Just describe the feature

Can you add anti view once for private message? This feature can only be used by the number owner. Command for example .vv

arugaz commented 7 months ago

You can create on dir owner with the command object, here the example how to resend

https://github.com/arugaz/whatsapp-bot/blob/3a9785eb3984b14debe8cff670b8e126e299a327/src/commands/group/antiviewonce_.ts#L3-L9

rivai45 commented 7 months ago

@arugaz bang, selalu muncul "Perintah penggunaannya salah", ini salah dimana nya ya?

"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { category: "owner", aliases: ["vv", "viewo"], cd: 3, desc: "Anti view once", ownerOnly: true, example: @PREFIX@CMD .trimEnd(), execute: async ({ aruga, message }) => { if (message.viewOnce) { return aruga.sendMessage(message.from, message, {ephemeralExpiration: message.expiration }); } throw "noCmd"; } } ;

rivai45 commented 7 months ago

Dah berhasil.. Tinggal otak atik dikit karna captionnya gk muncul wkwk..

vv.txt