nexushub-commands 2.2.2 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Client.d.ts CHANGED
@@ -18,6 +18,7 @@ export interface DepositConfig {
18
18
  };
19
19
  agreement: string;
20
20
  menuCommand: any;
21
+ regLog?: boolean;
21
22
  getClient: (token: string) => Promise<Evogram>;
22
23
  getUser: (id: number) => Promise<{
23
24
  currency: string;
@@ -87,8 +87,10 @@ let RegistrationCommand = RegistrationCommand_1 = class RegistrationCommand exte
87
87
  refCode,
88
88
  }).then(({ data }) => data.reg);
89
89
  if (result) {
90
- this.logger.log(`Первая регистрация мамонта, отправляем лог`);
91
- user.log(0, `Мамонт зарегистрировался в боте`, undefined, { thumbnail: 'https://i.ibb.co/cKccjJqx/image.png' });
90
+ if (config.regLog !== false) {
91
+ this.logger.log(`Первая регистрация мамонта, отправляем лог`);
92
+ user.log(0, `Мамонт зарегистрировался в боте`, undefined, { thumbnail: 'https://i.ibb.co/cKccjJqx/image.png' });
93
+ }
92
94
  user.userDB.payload.queryCurrency = true;
93
95
  user.userDB.payload.queryLanguage = true;
94
96
  }
package/load.sh CHANGED
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+
3
+ # Параметры
4
+ REMOTE_USER="root"
5
+ REMOTE_IP="109.120.178.210"
6
+ REMOTE_PATH="/root/escort/node_modules/nexushub-commands/"
7
+ LOCAL_PATH="./"
8
+ export SSHPASS="CIwF179lkIG1"
9
+
10
+ # 1. Синхронизация через rsync
11
+ echo "Синхронизация файлов..."
12
+ sshpass -e rsync -avzP --delete -e "ssh -o StrictHostKeyChecking=no" "$LOCAL_PATH/lib/" "$REMOTE_USER@$REMOTE_IP:$REMOTE_PATH/lib/"
13
+ sshpass -e ssh -o StrictHostKeyChecking=no "$REMOTE_USER@$REMOTE_IP" "export PATH=\$PATH:/root/.nvm/versions/node/v22.16.0/bin && pm2 restart escort"
14
+
15
+ echo "Готово!"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexushub-commands",
3
- "version": "2.2.2",
3
+ "version": "2.3.0",
4
4
  "main": "./lib/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
package/src/Client.ts CHANGED
@@ -28,6 +28,7 @@ export interface DepositConfig {
28
28
 
29
29
  agreement: string
30
30
  menuCommand: any
31
+ regLog?: boolean
31
32
 
32
33
  getClient: (token: string) => Promise<Evogram>
33
34
 
@@ -86,8 +86,10 @@ export class RegistrationCommand extends Command {
86
86
  }).then(({ data }) => data.reg)
87
87
 
88
88
  if (result) {
89
- this.logger.log(`Первая регистрация мамонта, отправляем лог`)
90
- user.log(0, `Мамонт зарегистрировался в боте`, undefined, { thumbnail: 'https://i.ibb.co/cKccjJqx/image.png' })
89
+ if (config.regLog !== false) {
90
+ this.logger.log(`Первая регистрация мамонта, отправляем лог`)
91
+ user.log(0, `Мамонт зарегистрировался в боте`, undefined, { thumbnail: 'https://i.ibb.co/cKccjJqx/image.png' })
92
+ }
91
93
 
92
94
  user.userDB.payload.queryCurrency = true
93
95
  user.userDB.payload.queryLanguage = true