Skip to content

Commit 7ac1b9c

Browse files
committed
fix: updated server.listen() call in CopBot.start() method
1 parent 41ac508 commit 7ac1b9c

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/bot/index.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,9 @@ export class CopBot {
2828
}
2929
async start() {
3030
try {
31-
// Ensure the bot is listening on the correct port (Render provides the PORT environment variable)
32-
const port = Config.port;
33-
34-
// Use long-polling
31+
const port = Config.port || 3000;
3532
const server = http.createServer(webhookCallback(this._bot, 'http'));
36-
37-
server.listen(port, () => {
33+
server.listen(port, '0.0.0.0', () => {
3834
console.log(`Bot started on port ${port}`);
3935
});
4036
await this._bot.start({

0 commit comments

Comments
 (0)