File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -71,9 +71,14 @@ export class CopBot {
7171 } catch ( err ) {
7272 console . error ( 'Failed to set webhook:' , err ) ;
7373 retries -= 1 ;
74- if ( retries === 0 ) throw err ;
74+ if ( retries === 0 ) {
75+ console . error ( 'Exhausted all retries to set the webhook' ) ;
76+ throw err ;
77+ }
7578 }
7679 }
80+ const webhookInfo = await this . _bot . api . getWebhookInfo ( ) ;
81+ console . log ( 'web hook info:' , webhookInfo ) ;
7782 await this . _bot . start ( {
7883 onStart : ( botInfo ) => {
7984 console . log ( `Bot started in web-hook mode! Username: ${ botInfo . username } ` ) ;
@@ -114,7 +119,6 @@ export class CopBot {
114119 }
115120 @SaveUserData ( )
116121 @MessageValidator ( )
117- @RateLimit ( { commandLimit : 3 , timeFrame : 15000 } )
118122 @Catch ( )
119123 async handleMessage ( ctx : Context ) {
120124 console . log ( 'ctx.message.text:' , ctx . message ?. text ) ;
You can’t perform that action at this time.
0 commit comments