Fix none strings

This commit is contained in:
Luquinhas 2025-04-20 11:54:57 -03:00
parent 5dcc9a6880
commit d4736a52b7
No known key found for this signature in database
GPG key ID: D9B075FC6DC93985
2 changed files with 13 additions and 13 deletions

View file

@ -12,7 +12,7 @@ async function getUserInfo(ctx) {
userInfo = Strings.userInfo
.replace('{userName}', `${ctx.from.first_name} ${lastName}` || Strings.varStrings.varUnknown)
.replace('{userId}', ctx.from.id || Strings.varStrings.varUnknown)
.replace('{userHandle}', ctx.from.username ? `@${ctx.from.username}` : Strings.varStrings.varStrings.varNone)
.replace('{userHandle}', ctx.from.username ? `@${ctx.from.username}` : Strings.varStrings.varNone)
.replace('{userPremium}', ctx.from.is_premium ? Strings.varStrings.varYes : Strings.varStrings.varNo)
.replace('{userLang}', ctx.from.language_code || Strings.varStrings.varUnknown);
@ -25,7 +25,7 @@ async function getChatInfo(ctx) {
chatInfo = Strings.chatInfo
.replace('{chatId}', ctx.chat.id || Strings.varStrings.varUnknown)
.replace('{chatName}', ctx.chat.title || Strings.varStrings.varUnknown)
.replace('{chatHandle}', ctx.chat.username ? `@${ctx.chat.username}` : Strings.varStrings.varStrings.varNone)
.replace('{chatHandle}', ctx.chat.username ? `@${ctx.chat.username}` : Strings.varStrings.varNone)
.replace('{chatMembersCount}', await ctx.getChatMembersCount(ctx.chat.id || Strings.varStrings.varUnknown))
.replace('{chatType}', ctx.chat.type || Strings.varStrings.varUnknown)
.replace('{isForum}', ctx.chat.is_forum ? Strings.varStrings.varYes : Strings.varStrings.varNo);