aggiornamenti vari. prima di VITE

This commit is contained in:
Surya Paolo
2025-02-25 18:13:01 +01:00
parent f8de205cf6
commit 57679fe649
25 changed files with 1595 additions and 708 deletions

View File

@@ -1653,7 +1653,7 @@ class Telegram {
let risp = '';
const id = msg.chat.id;
let testo = msg.text.toLowerCase().trim();
let testo = msg.text?.toLowerCase()?.trim();
testo = testo.replace('!', '');
testo = testo.replace('?', '');
testo = testo.replace('é', 'è');
@@ -1778,9 +1778,9 @@ class Telegram {
rec.user.index + ']: ' + rec.user.name + ' ' + rec.user.surname +
'\nUsername: ' + rec.user.username + '\n' + 'Email: ' +
rec.user.email + '\nLang: ' + rec.user.lang + tools.ACAPO;
risp += 'Num Invitati: ' + myrec.numinvitati + tools.ACAPO;
risp += 'Num Invitati Attivi: ' + myrec.numinvitatiattivi +
tools.ACAPO;
risp += 'Invitato da ' + rec.user.aportador_solidario + tools.ACAPO;
risp += 'Username Telegram ' + rec.user.profile.username_telegram + tools.ACAPO;
risp += 'Telegram ID ' + rec.user.profile.teleg_id + tools.ACAPO;
} else {
risp = 'Ancora non ti sei Attivato sul BOT';
}
@@ -2838,7 +2838,7 @@ class Telegram {
async setUsernameInvitante(msg) {
try {
let mymsg = msg.text?.toString().trim().toLowerCase();
let mymsg = msg.text?.toString()?.trim().toLowerCase();
let nomeapp = tools.getNomeAppByIdApp(this.idapp);
@@ -3065,7 +3065,7 @@ class Telegram {
texttosend = await this.getNextZoom(msg);
}
const cmd = texttosend.toLowerCase();
const cmd = texttosend?.toLowerCase();
if (usersall) {
if (this.isSelMenu(msg, cmd, 'INDIETRO')) {
@@ -3324,7 +3324,7 @@ class Telegram {
}
const rec = this.getRecInMem(msg);
let testo = msg.text?.toLowerCase().trim();
let testo = msg.text?.toLowerCase()?.trim();
status = this.getstatus(rec);
if (testo === Menu.EXIT_TELEGRAM) {
@@ -3388,7 +3388,7 @@ class Telegram {
rec.chatId = msg.chat.id;
rec.messageId = msg.message_id;
rec.msgall_status = StatusMSGALL.CONFIRM;
const cmd = rec?.msgtosent?.toString().toLowerCase() ?? '';
const cmd = rec?.msgtosent?.toString()?.toLowerCase() ?? '';
let achi = this.getDestinStr(msg, rec.msgall_achi, rec);
let domanda = '';
if (rec.msgall_domanda) {
@@ -3733,7 +3733,7 @@ class Telegram {
for (const recdb of recuser.menuDb) {
if (recdb.active_mem) {
if (recdb.idapp === idapp && recdb.lang === lang &&
recdb.label.toLowerCase() === testo) {
recdb.label?.toLowerCase() === testo) {
if (recdb.type === shared_consts.BOTTYPE_TEXT) {
return recdb.value;
} else if (recdb.type === shared_consts.BOTTYPE_LINK) {
@@ -3774,7 +3774,7 @@ class Telegram {
for (const recdb of recuser.menuDb) {
if (recdb.active_mem) {
if (recdb.idapp === idapp && recdb.lang === lang &&
recdb.label.toLowerCase() === testo) {
recdb.label?.toLowerCase() === testo) {
if (recdb.type === shared_consts.BOTTYPE_MARKDOWN) {
return 'Markdown'
} else {