koishi-plugin-tmp-bot 1.18.5 → 1.18.6

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.
@@ -1,5 +1,4 @@
1
- const BASE_API_V3 = 'https://api.truckyapp.com/v3';
2
- const BASE_API_V2 = 'https://api.truckyapp.com/v2';
1
+ const BASE_API = 'https://api.codetabs.com/v1/proxy/?quest=https://api.truckyapp.com';
3
2
  module.exports = {
4
3
  /**
5
4
  * 查询线上信息
@@ -7,7 +6,7 @@ module.exports = {
7
6
  async online(http, tmpId) {
8
7
  let result = null;
9
8
  try {
10
- result = await http.get(`${BASE_API_V3}/map/online?playerID=${tmpId}`);
9
+ result = await http.get(`${BASE_API}/v3/map/online?playerID=${tmpId}`);
11
10
  }
12
11
  catch {
13
12
  return {
@@ -29,7 +28,7 @@ module.exports = {
29
28
  async trafficTop(http, serverName) {
30
29
  let result = null;
31
30
  try {
32
- result = await http.get(`${BASE_API_V2}/traffic/top?game=ets2&server=${serverName}`);
31
+ result = await http.get(`${BASE_API}/v2/traffic/top?game=ets2&server=${serverName}`);
33
32
  }
34
33
  catch {
35
34
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-tmp-bot",
3
3
  "description": "欧洲卡车模拟2 TMP查询插件,不会部署的可以直接使用此机器人->QQ:3523283907",
4
- "version": "1.18.5",
4
+ "version": "1.18.6",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "homepage": "https://github.com/79887143/koishi-plugin-tmp-bot",