Skip to content

Commit 7bf7c96

Browse files
Merge pull request #301 from drauber/addLogInfo
Add connected number and instance name to connected log
2 parents 72b857a + 380d6a4 commit 7bf7c96

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/whatsapp/services/whatsapp.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,10 +1233,14 @@ export class WAStartupService {
12331233
this.logger.verbose('Connection opened');
12341234
this.instance.wuid = this.client.user.id.replace(/:\d+/, '');
12351235
this.instance.profilePictureUrl = (await this.profilePicture(this.instance.wuid)).profilePictureUrl;
1236+
const formattedWuid = this.instance.wuid.split('@')[0].padEnd(30, ' ');
1237+
const formattedName = this.instance.name.split('@')[0].padEnd(30, ' ');
12361238
this.logger.info(
12371239
`
12381240
┌──────────────────────────────┐
12391241
│ CONNECTED TO WHATSAPP │
1242+
${formattedWuid}
1243+
${formattedName}
12401244
└──────────────────────────────┘`.replace(/^ +/gm, ' '),
12411245
);
12421246

0 commit comments

Comments
 (0)