feat: event message_ciphertext (#2292)

* add option cipherMsg

* add event  message_ciphertext

* example

* remove option cipherMsg

* removing unlinked code

* Update Client.js

---------

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
tofers 2023-12-16 19:10:26 +03:00 • committed by GitHub
commit 1dd35be834
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 0 deletions

View file

@ -386,6 +386,14 @@ client.on('message_create', (msg) => {
}
});
client.on('message_ciphertext', (msg) => {
// Receiving new incoming messages that have been encrypted
// msg.type === 'ciphertext'
msg.body = 'Waiting for this message. Check your phone.';
// do stuff here
});
client.on('message_revoke_everyone', async (after, before) => {
// Fired whenever a message is deleted by anyone (including you)
console.log(after); // message after it was deleted.