Sistemazioni varie BUGS
This commit is contained in:
@@ -76,6 +76,8 @@ const emo = {
|
||||
};
|
||||
|
||||
MsgBot = {
|
||||
OK: ['si', 'ok'],
|
||||
CUORE: ['❤️', '💚️', '💜'],
|
||||
CIAO: [
|
||||
'ciao',
|
||||
'ciaoo',
|
||||
@@ -129,6 +131,7 @@ MsgBot = {
|
||||
HAHA: ['hahaha', 'ahah', '😂'],
|
||||
MI_AMI: ['mi ami'],
|
||||
TI_AMO: ['ti amo', 'ti adoro', 'ti lovvo'],
|
||||
PREGO: [ 'prego', 'Prego ! 💋💋💋'],
|
||||
GRAZIE: [
|
||||
'grazie ainy',
|
||||
'grazie',
|
||||
@@ -1475,6 +1478,8 @@ class Telegram {
|
||||
risp = 'Eh non te lo posso dire! ' + emo.JOY;
|
||||
} else if (MsgBot.GRAZIE.includes(testo.replace('!', ''))) {
|
||||
risp = 'Prego ! ' + emo.KISS + emo.KISS + emo.KISS;
|
||||
} else if (MsgBot.PREGO.includes(testo.replace('!', ''))) {
|
||||
risp = 'Grazie a te ! ' + emo.KISS + emo.KISS + emo.KISS;
|
||||
} else if (MsgBot.MI_AMI.find((rec) => testo.indexOf(rec) > -1)) {
|
||||
risp = ' Tantissimo! ' + emo.KISS + emo.GIFT_HEART + emo.GIFT_HEART +
|
||||
emo.GIFT_HEART;
|
||||
@@ -1542,8 +1547,11 @@ class Telegram {
|
||||
} else if (MsgBot.PAROLACCE.find((rec) => testo.indexOf(rec) > -1)) {
|
||||
risp = 'Da te non me l\'aspettavo proprio !! ' + emo.INNOCENT +
|
||||
emo.CROSS_ROSSA;
|
||||
} else if (MsgBot.HAHA.find((rec) => testo.indexOf(rec) > -1) &&
|
||||
testo.length < 8) {
|
||||
} else if (MsgBot.OK.find((rec) => testo.indexOf(rec) > -1)) {
|
||||
risp = '👍🏻';
|
||||
} else if (MsgBot.CUORE.find((rec) => testo.indexOf(rec) > -1)) {
|
||||
risp = '❤️💚💜';
|
||||
} else if (MsgBot.HAHA.find((rec) => testo.indexOf(rec) > -1) && testo.length < 8) {
|
||||
risp = emo.JOY + emo.JOY + emo.JOY;
|
||||
} else if (testo.length >= 10) {
|
||||
noanswer = true;
|
||||
@@ -1595,7 +1603,7 @@ class Telegram {
|
||||
if (risp !== '' && risp !== shared_consts.RIS_OK) {
|
||||
rec.numdomande++;
|
||||
if (!noanswer) {
|
||||
await tools.snooze(500);
|
||||
await tools.snooze(300);
|
||||
risp = '[BOT' + emo.ROBOT_FACE + ' scrive]:\n' + risp;
|
||||
}
|
||||
this._inviaMsg(id, risp, keyboard);
|
||||
@@ -2939,8 +2947,7 @@ class Telegram {
|
||||
let isAdmin = user ? user.profile.manage_telegram && user.username ===
|
||||
'paoloar77' : false;
|
||||
const isManager = user ? user.profile.manage_telegram : false;
|
||||
const isVerified = user ? user.profile.teleg_id > 0 &&
|
||||
user.verified_by_aportador : false;
|
||||
const isVerified = user ? user.profile.teleg_id > 0 && user.verified_by_aportador : false;
|
||||
|
||||
recuser.menuDb = await MyBot.findAllIdApp(idapp);
|
||||
|
||||
@@ -3533,6 +3540,10 @@ if (true) {
|
||||
const status = await myclTelegram.setInit(msg);
|
||||
|
||||
const rec = myclTelegram.getRecInMem(msg);
|
||||
|
||||
data.username = await User.getRealUsernameByUsername(idapp, data.username);
|
||||
data.userDest = await User.getRealUsernameByUsername(idapp, data.userDest);
|
||||
|
||||
const user = await User.getUserShortDataByUsername(idapp, data.username);
|
||||
const userDest = data.userDest ? await User.getUserShortDataByUsername(idapp, data.userDest) : null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user