feat: added group_admin_changed event (#2018)

* docs: updated

* added group-admin-change event

* minor changes

* added usage example

* minor changes: code docs updated
This commit is contained in:
alechkos 2023-04-01 19:40:47 +03:00 • committed by GitHub
commit 9f15499592
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 0 deletions

7
index.d.ts vendored
View file

@ -198,6 +198,12 @@ declare namespace WAWebJS {
notification: GroupNotification
) => void): this
/** Emitted when a current user is promoted to an admin or demoted to a regular user */
on(event: 'group_admin_changed', listener: (
/** GroupNotification with more information about the action */
notification: GroupNotification
) => void): this
/** Emitted when group settings are updated, such as subject, description or picture */
on(event: 'group_update', listener: (
/** GroupNotification with more information about the action */
@ -512,6 +518,7 @@ declare namespace WAWebJS {
MEDIA_UPLOADED = 'media_uploaded',
GROUP_JOIN = 'group_join',
GROUP_LEAVE = 'group_leave',
GROUP_ADMIN_CHANGED = 'group_admin_changed',
GROUP_UPDATE = 'group_update',
QR_RECEIVED = 'qr',
LOADING_SCREEN = 'loading_screen',