@@ -47,30 +47,24 @@ client.on("qr", (qr: string) => {
4747 qrcode . generate ( qr , { small : true } ) ;
4848} ) ;
4949
50- client . on ( "ready" , async ( ) => ready ( ) ) ;
50+ client . on ( "ready" , ( ) => ready ( ) ) ;
5151
52- client . on ( "message_reaction" , async ( react : Reaction ) =>
53- reaction ( client , react ) ,
54- ) ;
52+ client . on ( "message_reaction" , ( react : Reaction ) => reaction ( client , react ) ) ;
5553
5654// client.on("message", (msg) => messageEvent(msg));
57- client . on ( "message_create" , async ( msg : Message ) => messageEvent ( msg , "create" ) ) ;
55+ client . on ( "message_create" , ( msg : Message ) => messageEvent ( msg , "create" ) ) ;
5856
59- client . on (
60- "message_edit" ,
61- async ( msg : Message , newBody : string , prevBody : string ) => {
62- msg . body = newBody ;
63- await Promise . all ( [ messageEdit ( msg , newBody , prevBody ) , messageEvent ( msg , "edit" ) ] ) ;
64- } ,
65- ) ;
57+ client . on ( "message_edit" , ( msg : Message , newBody : string , prevBody : string ) => {
58+ msg . body = newBody ;
59+ Promise . all ( [ messageEdit ( msg , newBody , prevBody ) , messageEvent ( msg , "edit" ) ] ) ;
60+ } ) ;
6661
67- client . on (
68- "message_revoke_everyone" ,
69- async ( msg : Message , revoked_msg ?: Message ) => revoke ( msg , revoked_msg ) ,
62+ client . on ( "message_revoke_everyone" , ( msg : Message , revoked_msg ?: Message ) =>
63+ revoke ( msg , revoked_msg ) ,
7064) ;
7165
72- client . on ( "group_join" , async ( notif : GroupNotification ) => groupJoin ( notif ) ) ;
73- client . on ( "group_leave" , async ( notif : GroupNotification ) => groupLeave ( notif ) ) ;
66+ client . on ( "group_join" , ( notif : GroupNotification ) => groupJoin ( notif ) ) ;
67+ client . on ( "group_leave" , ( notif : GroupNotification ) => groupLeave ( notif ) ) ;
7468client . on ( "auth_failure" , ( msg : string ) => {
7569 loadingBar . stop ( ) ;
7670 log . error ( "Auth" , "Authentication failed. Please try again." ) ;
0 commit comments