@@ -5,7 +5,7 @@ export class WebhookServer {
55 private app : express . Application ;
66 private server : any ;
77 private readonly BOT_WEBHOOK_SECRET = process . env . BOT_WEBHOOK_SECRET ;
8- private readonly PORT = process . env . WEBHOOK_PORT || 3000 ;
8+ private readonly PORT = Number ( process . env . WEBHOOK_PORT ) ;
99 private readonly PUBLIC_URL = process . env . PUBLIC_URL || "https://services-t7ru.alwaysdata.net" ;
1010 private guild : any ;
1111
@@ -31,14 +31,9 @@ export class WebhookServer {
3131 return res . status ( 401 ) . json ( { error : "Unauthorized" } ) ;
3232 }
3333
34- console . log (
35- "📊 Recap update notification received, syncing top contributors..." ,
36- ) ;
34+ console . log ( "📊 Recap update notification received, syncing top contributors..." ) ;
3735
38- // Sync all top contributor roles
39- const result = await TopContributorsManager . syncAllTopContributorRoles (
40- this . guild ,
41- ) ;
36+ const result = await TopContributorsManager . syncAllTopContributorRoles ( this . guild ) ;
4237
4338 console . log ( `✅ Top contributor sync complete:` , {
4439 processed : result . processed ,
@@ -79,8 +74,8 @@ export class WebhookServer {
7974 }
8075
8176 public start ( ) : void {
82- this . server = this . app . listen ( this . PORT , ( ) => {
83- console . log ( `🌐 Webhook server listening on port ${ this . PORT } ` ) ;
77+ this . server = this . app . listen ( this . PORT , "::" , ( ) => {
78+ console . log ( `🌐 Webhook server listening on port ${ this . PORT } (IPv6) ` ) ;
8479 console . log ( `📡 Health check: ${ this . PUBLIC_URL } /health` ) ;
8580 console . log ( `🔔 Webhook endpoint: ${ this . PUBLIC_URL } /webhook/recap-update` ) ;
8681 } ) ;
0 commit comments