Skip to content

Commit

Permalink
Merge pull request #301 from drauber/addLogInfo
Browse files Browse the repository at this point in the history
Add connected number and instance name to connected log
  • Loading branch information
DavidsonGomes authored Dec 19, 2023
2 parents 72b857a + 380d6a4 commit 7bf7c96
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/whatsapp/services/whatsapp.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1233,10 +1233,14 @@ export class WAStartupService {
this.logger.verbose('Connection opened');
this.instance.wuid = this.client.user.id.replace(/:\d+/, '');
this.instance.profilePictureUrl = (await this.profilePicture(this.instance.wuid)).profilePictureUrl;
const formattedWuid = this.instance.wuid.split('@')[0].padEnd(30, ' ');
const formattedName = this.instance.name.split('@')[0].padEnd(30, ' ');
this.logger.info(
`
┌──────────────────────────────┐
│ CONNECTED TO WHATSAPP │
${formattedWuid}
${formattedName}
└──────────────────────────────┘`.replace(/^ +/gm, ' '),
);

Expand Down

0 comments on commit 7bf7c96

Please sign in to comment.