- menu BOT

- verified_by_aportador
This commit is contained in:
paoloar77
2021-12-29 18:26:08 +01:00
parent 665680b531
commit 2d80150e9a
13 changed files with 743 additions and 137 deletions

View File

@@ -45,6 +45,8 @@ console.log("DB: " + process.env.DATABASE);
var app = express();
let telegrambot = null;
const tools = require('./tools/general');
require('./models/cfgserver');
@@ -69,6 +71,7 @@ myLoad().then(ris => {
require('./models/mailinglist');
require('./models/newstosent');
require('./models/mypage');
require('./models/bot');
require('./models/calzoom');
const mysql_func = require('./mysql/mysql_func');
@@ -222,12 +225,11 @@ async function mystart() {
testmsgwebpush();
faitest();
// tools.sendNotifToAdmin('Riparti', 'Riparti');
// sendemail.testemail('2', 'it');
let miapass = 'passpao1pa@1A';
let miapass = '';
if (miapass !== '') {
let crypt = tools.cryptdata(miapass);
@@ -242,11 +244,14 @@ async function mystart() {
}
}
telegrambot = require('./telegram/telegrambot');
await inizia();
await resetProcessingJob();
faitest();
// ----------------- MAILCHIMP -----
const querystring = require('querystring');
@@ -369,7 +374,6 @@ async function resetProcessingJob() {
async function inizia() {
const telegrambot = require('./telegram/telegrambot');
if (process.env.NODE_ENV === 'development') {
await telegrambot.sendMsgTelegram(tools.FREEPLANET, telegrambot.ADMIN_USER_SERVER, `Ciao ${telegrambot.ADMIN_USER_NAME_SERVER}!`);
@@ -420,6 +424,43 @@ async function faitest() {
console.log('ris', ris);
}
if (false) {
const { User } = require('./models/user');
const idapp = tools.FREEPLANET;
const idreg = 0;
try {
const user = await User.findOne({
idapp,
username: 'paoloar773',
});
user.aportador_solidario = 'paoloar77';
let mylocalsconf = {
idapp,
dataemail: null,
locale: user.lang,
nomeapp: tools.getNomeAppByIdApp(idapp),
strlinksito: tools.getHostByIdApp(idapp),
strlinkreg: '',
username: user.username,
name: user.name,
surname: user.surname,
forgetpwd: tools.getHostByIdApp(idapp) + '/requestresetpwd',
emailto: '',
user,
};
await telegrambot.notifyToTelegram(telegrambot.phase.REGISTRATION,
mylocalsconf);
} catch (e) {
console.log('error ' + e);
}
}
}
module.exports = { app };