@takaro/modules 0.0.14 → 0.0.18

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.
Files changed (244) hide show
  1. package/dist/BuiltinModule.d.ts +13 -8
  2. package/dist/BuiltinModule.d.ts.map +1 -0
  3. package/dist/BuiltinModule.js +48 -31
  4. package/dist/BuiltinModule.js.map +1 -1
  5. package/dist/dto/base.d.ts +1 -0
  6. package/dist/dto/base.d.ts.map +1 -0
  7. package/dist/dto/discordEvents.d.ts +1 -0
  8. package/dist/dto/discordEvents.d.ts.map +1 -0
  9. package/dist/dto/gameEvents.d.ts +1 -0
  10. package/dist/dto/gameEvents.d.ts.map +1 -0
  11. package/dist/dto/index.d.ts +4 -0
  12. package/dist/dto/index.d.ts.map +1 -0
  13. package/dist/dto/takaroEvents.d.ts +16 -0
  14. package/dist/dto/takaroEvents.d.ts.map +1 -0
  15. package/dist/dto/takaroEvents.js +36 -0
  16. package/dist/dto/takaroEvents.js.map +1 -1
  17. package/dist/main.d.ts +4 -3
  18. package/dist/main.d.ts.map +1 -0
  19. package/dist/main.js +3 -1
  20. package/dist/main.js.map +1 -1
  21. package/dist/modules/chatBridge/hooks/DiscordToGame.d.ts +1 -0
  22. package/dist/modules/chatBridge/hooks/DiscordToGame.d.ts.map +1 -0
  23. package/dist/modules/chatBridge/hooks/GameToDiscord.d.ts +1 -0
  24. package/dist/modules/chatBridge/hooks/GameToDiscord.d.ts.map +1 -0
  25. package/dist/modules/chatBridge/hooks/PlayerConnected.d.ts +1 -0
  26. package/dist/modules/chatBridge/hooks/PlayerConnected.d.ts.map +1 -0
  27. package/dist/modules/chatBridge/hooks/PlayerDisconnected.d.ts +1 -0
  28. package/dist/modules/chatBridge/hooks/PlayerDisconnected.d.ts.map +1 -0
  29. package/dist/modules/chatBridge/index.d.ts +3 -2
  30. package/dist/modules/chatBridge/index.d.ts.map +1 -0
  31. package/dist/modules/chatBridge/index.js +55 -47
  32. package/dist/modules/chatBridge/index.js.map +1 -1
  33. package/dist/modules/dailyRewards/commands/daily.d.ts +2 -0
  34. package/dist/modules/dailyRewards/commands/daily.d.ts.map +1 -0
  35. package/dist/modules/dailyRewards/commands/daily.js +106 -0
  36. package/dist/modules/dailyRewards/commands/daily.js.map +1 -0
  37. package/dist/modules/dailyRewards/commands/streak.d.ts +2 -0
  38. package/dist/modules/dailyRewards/commands/streak.d.ts.map +1 -0
  39. package/dist/modules/dailyRewards/commands/streak.js +34 -0
  40. package/dist/modules/dailyRewards/commands/streak.js.map +1 -0
  41. package/dist/modules/dailyRewards/commands/topstreak.d.ts +2 -0
  42. package/dist/modules/dailyRewards/commands/topstreak.d.ts.map +1 -0
  43. package/dist/modules/dailyRewards/commands/topstreak.js +44 -0
  44. package/dist/modules/dailyRewards/commands/topstreak.js.map +1 -0
  45. package/dist/modules/dailyRewards/functions/utils.d.ts +6 -0
  46. package/dist/modules/dailyRewards/functions/utils.d.ts.map +1 -0
  47. package/dist/modules/dailyRewards/functions/utils.js +32 -0
  48. package/dist/modules/dailyRewards/functions/utils.js.map +1 -0
  49. package/dist/modules/dailyRewards/hooks/dailyLoginCheck.d.ts +2 -0
  50. package/dist/modules/dailyRewards/hooks/dailyLoginCheck.d.ts.map +1 -0
  51. package/dist/modules/dailyRewards/hooks/dailyLoginCheck.js +19 -0
  52. package/dist/modules/dailyRewards/hooks/dailyLoginCheck.js.map +1 -0
  53. package/dist/modules/dailyRewards/index.d.ts +5 -0
  54. package/dist/modules/dailyRewards/index.d.ts.map +1 -0
  55. package/dist/modules/dailyRewards/index.js +125 -0
  56. package/dist/modules/dailyRewards/index.js.map +1 -0
  57. package/dist/modules/economyUtils/commands/balance.d.ts +1 -0
  58. package/dist/modules/economyUtils/commands/balance.d.ts.map +1 -0
  59. package/dist/modules/economyUtils/commands/claim.d.ts +1 -0
  60. package/dist/modules/economyUtils/commands/claim.d.ts.map +1 -0
  61. package/dist/modules/economyUtils/commands/confirmTransfer.d.ts +1 -0
  62. package/dist/modules/economyUtils/commands/confirmTransfer.d.ts.map +1 -0
  63. package/dist/modules/economyUtils/commands/grantCurrency.d.ts +1 -0
  64. package/dist/modules/economyUtils/commands/grantCurrency.d.ts.map +1 -0
  65. package/dist/modules/economyUtils/commands/revokeCurrency.d.ts +1 -0
  66. package/dist/modules/economyUtils/commands/revokeCurrency.d.ts.map +1 -0
  67. package/dist/modules/economyUtils/commands/shop.d.ts +1 -0
  68. package/dist/modules/economyUtils/commands/shop.d.ts.map +1 -0
  69. package/dist/modules/economyUtils/commands/topCurrency.d.ts +1 -0
  70. package/dist/modules/economyUtils/commands/topCurrency.d.ts.map +1 -0
  71. package/dist/modules/economyUtils/commands/transfer.d.ts +1 -0
  72. package/dist/modules/economyUtils/commands/transfer.d.ts.map +1 -0
  73. package/dist/modules/economyUtils/cronJobs/zombieKillReward.d.ts +1 -0
  74. package/dist/modules/economyUtils/cronJobs/zombieKillReward.d.ts.map +1 -0
  75. package/dist/modules/economyUtils/index.d.ts +3 -2
  76. package/dist/modules/economyUtils/index.d.ts.map +1 -0
  77. package/dist/modules/economyUtils/index.js +178 -170
  78. package/dist/modules/economyUtils/index.js.map +1 -1
  79. package/dist/modules/geoBlock/hooks/IPDetected.d.ts +1 -0
  80. package/dist/modules/geoBlock/hooks/IPDetected.d.ts.map +1 -0
  81. package/dist/modules/geoBlock/hooks/IPDetected.js +4 -2
  82. package/dist/modules/geoBlock/hooks/IPDetected.js.map +1 -1
  83. package/dist/modules/geoBlock/index.d.ts +3 -2
  84. package/dist/modules/geoBlock/index.d.ts.map +1 -0
  85. package/dist/modules/geoBlock/index.js +71 -63
  86. package/dist/modules/geoBlock/index.js.map +1 -1
  87. package/dist/modules/gimme/commands/gimme.d.ts +1 -0
  88. package/dist/modules/gimme/commands/gimme.d.ts.map +1 -0
  89. package/dist/modules/gimme/commands/gimme.js +17 -6
  90. package/dist/modules/gimme/commands/gimme.js.map +1 -1
  91. package/dist/modules/gimme/index.d.ts +3 -2
  92. package/dist/modules/gimme/index.d.ts.map +1 -0
  93. package/dist/modules/gimme/index.js +64 -34
  94. package/dist/modules/gimme/index.js.map +1 -1
  95. package/dist/modules/highPingKicker/cronJobs/Ping check.d.ts +1 -0
  96. package/dist/modules/highPingKicker/cronJobs/Ping check.d.ts.map +1 -0
  97. package/dist/modules/highPingKicker/index.d.ts +3 -2
  98. package/dist/modules/highPingKicker/index.d.ts.map +1 -0
  99. package/dist/modules/highPingKicker/index.js +36 -28
  100. package/dist/modules/highPingKicker/index.js.map +1 -1
  101. package/dist/modules/lottery/commands/buyTicket.d.ts +1 -0
  102. package/dist/modules/lottery/commands/buyTicket.d.ts.map +1 -0
  103. package/dist/modules/lottery/commands/nextDraw.d.ts +1 -0
  104. package/dist/modules/lottery/commands/nextDraw.d.ts.map +1 -0
  105. package/dist/modules/lottery/commands/viewTickets.d.ts +1 -0
  106. package/dist/modules/lottery/commands/viewTickets.d.ts.map +1 -0
  107. package/dist/modules/lottery/cronJobs/drawLottery.d.ts +1 -0
  108. package/dist/modules/lottery/cronJobs/drawLottery.d.ts.map +1 -0
  109. package/dist/modules/lottery/index.d.ts +3 -2
  110. package/dist/modules/lottery/index.d.ts.map +1 -0
  111. package/dist/modules/lottery/index.js +73 -65
  112. package/dist/modules/lottery/index.js.map +1 -1
  113. package/dist/modules/playerOnboarding/commands/starterkit.d.ts +1 -0
  114. package/dist/modules/playerOnboarding/commands/starterkit.d.ts.map +1 -0
  115. package/dist/modules/playerOnboarding/commands/starterkit.js +16 -3
  116. package/dist/modules/playerOnboarding/commands/starterkit.js.map +1 -1
  117. package/dist/modules/playerOnboarding/hooks/playerConnected.d.ts +1 -0
  118. package/dist/modules/playerOnboarding/hooks/playerConnected.d.ts.map +1 -0
  119. package/dist/modules/playerOnboarding/index.d.ts +3 -2
  120. package/dist/modules/playerOnboarding/index.d.ts.map +1 -0
  121. package/dist/modules/playerOnboarding/index.js +73 -43
  122. package/dist/modules/playerOnboarding/index.js.map +1 -1
  123. package/dist/modules/serverMessages/cronJobs/Automated message.d.ts +1 -0
  124. package/dist/modules/serverMessages/cronJobs/Automated message.d.ts.map +1 -0
  125. package/dist/modules/serverMessages/index.d.ts +3 -2
  126. package/dist/modules/serverMessages/index.d.ts.map +1 -0
  127. package/dist/modules/serverMessages/index.js +36 -28
  128. package/dist/modules/serverMessages/index.js.map +1 -1
  129. package/dist/modules/teleports/commands/deletetp.d.ts +1 -0
  130. package/dist/modules/teleports/commands/deletetp.d.ts.map +1 -0
  131. package/dist/modules/teleports/commands/deletewaypoint.d.ts +1 -0
  132. package/dist/modules/teleports/commands/deletewaypoint.d.ts.map +1 -0
  133. package/dist/modules/teleports/commands/deletewaypoint.js +4 -35
  134. package/dist/modules/teleports/commands/deletewaypoint.js.map +1 -1
  135. package/dist/modules/teleports/commands/listwaypoints.d.ts +1 -0
  136. package/dist/modules/teleports/commands/listwaypoints.d.ts.map +1 -0
  137. package/dist/modules/teleports/commands/listwaypoints.js +3 -22
  138. package/dist/modules/teleports/commands/listwaypoints.js.map +1 -1
  139. package/dist/modules/teleports/commands/setprivate.d.ts +1 -0
  140. package/dist/modules/teleports/commands/setprivate.d.ts.map +1 -0
  141. package/dist/modules/teleports/commands/setpublic.d.ts +1 -0
  142. package/dist/modules/teleports/commands/setpublic.d.ts.map +1 -0
  143. package/dist/modules/teleports/commands/settp.d.ts +1 -0
  144. package/dist/modules/teleports/commands/settp.d.ts.map +1 -0
  145. package/dist/modules/teleports/commands/setwaypoint.d.ts +1 -0
  146. package/dist/modules/teleports/commands/setwaypoint.d.ts.map +1 -0
  147. package/dist/modules/teleports/commands/setwaypoint.js +5 -63
  148. package/dist/modules/teleports/commands/setwaypoint.js.map +1 -1
  149. package/dist/modules/teleports/commands/teleport.d.ts +1 -0
  150. package/dist/modules/teleports/commands/teleport.d.ts.map +1 -0
  151. package/dist/modules/teleports/commands/teleportwaypoint.d.ts +1 -0
  152. package/dist/modules/teleports/commands/teleportwaypoint.d.ts.map +1 -0
  153. package/dist/modules/teleports/commands/teleportwaypoint.js +7 -23
  154. package/dist/modules/teleports/commands/teleportwaypoint.js.map +1 -1
  155. package/dist/modules/teleports/commands/tplist.d.ts +1 -0
  156. package/dist/modules/teleports/commands/tplist.d.ts.map +1 -0
  157. package/dist/modules/teleports/cronJobs/Waypoint reconciler.d.ts +2 -0
  158. package/dist/modules/teleports/cronJobs/Waypoint reconciler.d.ts.map +1 -0
  159. package/dist/modules/teleports/cronJobs/Waypoint reconciler.js +6 -0
  160. package/dist/modules/teleports/cronJobs/Waypoint reconciler.js.map +1 -0
  161. package/dist/modules/teleports/functions/utils.d.ts +12 -0
  162. package/dist/modules/teleports/functions/utils.d.ts.map +1 -0
  163. package/dist/modules/teleports/functions/utils.js +117 -0
  164. package/dist/modules/teleports/functions/utils.js.map +1 -1
  165. package/dist/modules/teleports/index.d.ts +3 -2
  166. package/dist/modules/teleports/index.d.ts.map +1 -0
  167. package/dist/modules/teleports/index.js +188 -172
  168. package/dist/modules/teleports/index.js.map +1 -1
  169. package/dist/modules/timedShutdown/cronJobs/Shutdown.d.ts +1 -0
  170. package/dist/modules/timedShutdown/cronJobs/Shutdown.d.ts.map +1 -0
  171. package/dist/modules/timedShutdown/cronJobs/warning.d.ts +1 -0
  172. package/dist/modules/timedShutdown/cronJobs/warning.d.ts.map +1 -0
  173. package/dist/modules/timedShutdown/index.d.ts +3 -2
  174. package/dist/modules/timedShutdown/index.d.ts.map +1 -0
  175. package/dist/modules/timedShutdown/index.js +35 -27
  176. package/dist/modules/timedShutdown/index.js.map +1 -1
  177. package/dist/modules/utils/commands/help.d.ts +1 -0
  178. package/dist/modules/utils/commands/help.d.ts.map +1 -0
  179. package/dist/modules/utils/commands/help.js +10 -9
  180. package/dist/modules/utils/commands/help.js.map +1 -1
  181. package/dist/modules/utils/commands/ping.d.ts +1 -0
  182. package/dist/modules/utils/commands/ping.d.ts.map +1 -0
  183. package/dist/modules/utils/index.d.ts +3 -2
  184. package/dist/modules/utils/index.d.ts.map +1 -0
  185. package/dist/modules/utils/index.js +36 -28
  186. package/dist/modules/utils/index.js.map +1 -1
  187. package/dist/modules.json +601 -506
  188. package/package.json +2 -5
  189. package/scripts/buildBuiltinJson.ts +50 -2
  190. package/src/BuiltinModule.ts +25 -17
  191. package/src/__tests__/aliases.integration.test.ts +23 -26
  192. package/src/__tests__/bugRepros.integration.test.ts +261 -10
  193. package/src/__tests__/builtinmodule.unit.test.ts +3 -1
  194. package/src/__tests__/commandArgs.integration.test.ts +13 -6
  195. package/src/__tests__/economy/claim.integration.test.ts +1 -0
  196. package/src/__tests__/economy/economyUtils.integration.test.ts +43 -46
  197. package/src/__tests__/economy/shop.integration.test.ts +28 -4
  198. package/src/__tests__/economy/zombieKillReward.integration.test.ts +28 -31
  199. package/src/__tests__/geoblock.integration.test.ts +76 -91
  200. package/src/__tests__/gimme.integration.test.ts +25 -22
  201. package/src/__tests__/help.integration.test.ts +21 -20
  202. package/src/__tests__/lottery.integration.test.ts +15 -11
  203. package/src/__tests__/modulePermission.integration.test.ts +17 -13
  204. package/src/__tests__/onboarding.integration.test.ts +43 -43
  205. package/src/__tests__/ping.integration.test.ts +5 -4
  206. package/src/__tests__/roleExpiry.integration.test.ts +5 -4
  207. package/src/__tests__/serverMessages.integration.test.ts +24 -27
  208. package/src/__tests__/systemConfigCooldown.integration.test.ts +5 -1
  209. package/src/__tests__/systemConfigCost.integration.test.ts +16 -17
  210. package/src/__tests__/teleports/listtp.integration.test.ts +20 -21
  211. package/src/__tests__/teleports/publicteleports.integration.test.ts +58 -70
  212. package/src/__tests__/teleports/teleport.integration.test.ts +16 -17
  213. package/src/__tests__/teleports/tpManagement.integration.test.ts +21 -20
  214. package/src/__tests__/teleports/waypoints.integration.test.ts +52 -6
  215. package/src/dto/takaroEvents.ts +21 -0
  216. package/src/main.ts +14 -4
  217. package/src/modules/chatBridge/index.ts +54 -51
  218. package/src/modules/dailyRewards/commands/daily.js +118 -0
  219. package/src/modules/dailyRewards/commands/streak.js +42 -0
  220. package/src/modules/dailyRewards/commands/topstreak.js +54 -0
  221. package/src/modules/dailyRewards/functions/utils.js +36 -0
  222. package/src/modules/dailyRewards/hooks/dailyLoginCheck.js +24 -0
  223. package/src/modules/dailyRewards/index.ts +136 -0
  224. package/src/modules/economyUtils/index.ts +182 -179
  225. package/src/modules/geoBlock/hooks/IPDetected.js +4 -2
  226. package/src/modules/geoBlock/index.ts +72 -70
  227. package/src/modules/gimme/commands/gimme.js +16 -6
  228. package/src/modules/gimme/index.ts +62 -37
  229. package/src/modules/highPingKicker/index.ts +35 -32
  230. package/src/modules/lottery/index.ts +73 -71
  231. package/src/modules/playerOnboarding/commands/starterkit.js +19 -5
  232. package/src/modules/playerOnboarding/index.ts +72 -47
  233. package/src/modules/serverMessages/index.ts +36 -32
  234. package/src/modules/teleports/commands/deletewaypoint.js +4 -53
  235. package/src/modules/teleports/commands/listwaypoints.js +3 -35
  236. package/src/modules/teleports/commands/setwaypoint.js +5 -83
  237. package/src/modules/teleports/commands/teleportwaypoint.js +9 -36
  238. package/src/modules/teleports/cronJobs/Waypoint reconciler.js +7 -0
  239. package/src/modules/teleports/functions/utils.js +150 -0
  240. package/src/modules/teleports/index.ts +196 -180
  241. package/src/modules/timedShutdown/index.ts +35 -30
  242. package/src/modules/utils/commands/help.js +14 -14
  243. package/src/modules/utils/index.ts +36 -32
  244. package/tsconfig.json +1 -1
@@ -7,6 +7,7 @@ import {
7
7
  EventsAwaiter,
8
8
  } from '@takaro/test';
9
9
  import { GameEvents } from '../dto/gameEvents.js';
10
+ import { describe } from 'node:test';
10
11
 
11
12
  const group = 'Help command';
12
13
 
@@ -17,10 +18,10 @@ const tests = [
17
18
  setup: modulesTestSetup,
18
19
  name: 'Help command responds with a list of installed commands',
19
20
  test: async function () {
20
- await this.client.gameserver.gameServerControllerInstallModule(
21
- this.setupData.gameserver.id,
22
- this.setupData.utilsModule.id,
23
- );
21
+ await this.client.module.moduleInstallationsControllerInstallModule({
22
+ gameServerId: this.setupData.gameserver.id,
23
+ versionId: this.setupData.utilsModule.latestVersion.id,
24
+ });
24
25
  const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 3);
25
26
  await this.client.command.commandControllerTrigger(this.setupData.gameserver.id, {
26
27
  msg: '/help',
@@ -45,14 +46,14 @@ const tests = [
45
46
  setup: modulesTestSetup,
46
47
  name: 'Help command responds with a list of installed commands, picking up commands from multiple modules',
47
48
  test: async function () {
48
- await this.client.gameserver.gameServerControllerInstallModule(
49
- this.setupData.gameserver.id,
50
- this.setupData.utilsModule.id,
51
- );
52
- await this.client.gameserver.gameServerControllerInstallModule(
53
- this.setupData.gameserver.id,
54
- this.setupData.teleportsModule.id,
55
- );
49
+ await this.client.module.moduleInstallationsControllerInstallModule({
50
+ gameServerId: this.setupData.gameserver.id,
51
+ versionId: this.setupData.utilsModule.latestVersion.id,
52
+ });
53
+ await this.client.module.moduleInstallationsControllerInstallModule({
54
+ gameServerId: this.setupData.gameserver.id,
55
+ versionId: this.setupData.teleportsModule.latestVersion.id,
56
+ });
56
57
  const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 13);
57
58
  await this.client.command.commandControllerTrigger(this.setupData.gameserver.id, {
58
59
  msg: '/help',
@@ -92,10 +93,10 @@ const tests = [
92
93
  setup: modulesTestSetup,
93
94
  name: 'Help command responds with detailed info about a specific command',
94
95
  test: async function () {
95
- await this.client.gameserver.gameServerControllerInstallModule(
96
- this.setupData.gameserver.id,
97
- this.setupData.utilsModule.id,
98
- );
96
+ await this.client.module.moduleInstallationsControllerInstallModule({
97
+ gameServerId: this.setupData.gameserver.id,
98
+ versionId: this.setupData.utilsModule.latestVersion.id,
99
+ });
99
100
 
100
101
  const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 1);
101
102
 
@@ -118,10 +119,10 @@ const tests = [
118
119
  setup: modulesTestSetup,
119
120
  name: 'Help command responds with unknown command message if command does not exist',
120
121
  test: async function () {
121
- await this.client.gameserver.gameServerControllerInstallModule(
122
- this.setupData.gameserver.id,
123
- this.setupData.utilsModule.id,
124
- );
122
+ await this.client.module.moduleInstallationsControllerInstallModule({
123
+ gameServerId: this.setupData.gameserver.id,
124
+ versionId: this.setupData.utilsModule.latestVersion.id,
125
+ });
125
126
 
126
127
  const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 1);
127
128
 
@@ -1,6 +1,7 @@
1
1
  import { IntegrationTest, expect, IModuleTestsSetupData, modulesTestSetup, EventsAwaiter } from '@takaro/test';
2
2
  import { GameEvents } from '../dto/index.js';
3
3
  import { Client } from '@takaro/apiclient';
4
+ import { describe } from 'node:test';
4
5
 
5
6
  const group = 'lottery suite';
6
7
  const ticketCost = 50;
@@ -35,7 +36,10 @@ const setup = async function (this: IntegrationTest<IModuleTestsSetupData>): Pro
35
36
  gameServerId: data.gameserver.id,
36
37
  });
37
38
 
38
- await this.client.gameserver.gameServerControllerInstallModule(data.gameserver.id, data.economyUtilsModule.id);
39
+ await this.client.module.moduleInstallationsControllerInstallModule({
40
+ gameServerId: data.gameserver.id,
41
+ versionId: data.economyUtilsModule.latestVersion.id,
42
+ });
39
43
 
40
44
  const pogs = await this.client.playerOnGameserver.playerOnGameServerControllerSearch({
41
45
  filters: {
@@ -51,7 +55,9 @@ const setup = async function (this: IntegrationTest<IModuleTestsSetupData>): Pro
51
55
 
52
56
  await Promise.allSettled(tasks);
53
57
 
54
- await this.client.gameserver.gameServerControllerInstallModule(data.gameserver.id, data.lotteryModule.id, {
58
+ await this.client.module.moduleInstallationsControllerInstallModule({
59
+ gameServerId: data.gameserver.id,
60
+ versionId: data.lotteryModule.latestVersion.id,
55
61
  systemConfig: JSON.stringify({
56
62
  commands: {
57
63
  buyTicket: {
@@ -211,16 +217,14 @@ const tests = [
211
217
 
212
218
  await this.client.cronjob.cronJobControllerTrigger({
213
219
  moduleId: this.setupData.lotteryModule.id,
214
- cronjobId: this.setupData.lotteryModule.cronJobs[0].id,
220
+ cronjobId: this.setupData.lotteryModule.latestVersion.cronJobs[0].id,
215
221
  gameServerId: this.setupData.gameserver.id,
216
222
  });
217
223
 
218
- const mod = (
219
- await this.client.gameserver.gameServerControllerGetModuleInstallation(
220
- this.setupData.gameserver.id,
221
- this.setupData.lotteryModule.id,
222
- )
223
- ).data.data;
224
+ const installationsRes = await this.client.module.moduleInstallationsControllerGetInstalledModules({
225
+ filters: { gameserverId: [this.setupData.gameserver.id], moduleId: [this.setupData.lotteryModule.id] },
226
+ });
227
+ const mod = installationsRes.data.data[0];
224
228
 
225
229
  const userConfig: Record<string, any> = mod.userConfig;
226
230
  const prize = ticketCost * playerAmount * (1 - userConfig.profitMargin);
@@ -252,7 +256,7 @@ const tests = [
252
256
 
253
257
  await this.client.cronjob.cronJobControllerTrigger({
254
258
  moduleId: this.setupData.lotteryModule.id,
255
- cronjobId: this.setupData.lotteryModule.cronJobs[0].id,
259
+ cronjobId: this.setupData.lotteryModule.latestVersion.cronJobs[0].id,
256
260
  gameServerId: this.setupData.gameserver.id,
257
261
  });
258
262
 
@@ -288,7 +292,7 @@ const tests = [
288
292
 
289
293
  await this.client.cronjob.cronJobControllerTrigger({
290
294
  moduleId: this.setupData.lotteryModule.id,
291
- cronjobId: this.setupData.lotteryModule.cronJobs[0].id,
295
+ cronjobId: this.setupData.lotteryModule.latestVersion.cronJobs[0].id,
292
296
  gameServerId: this.setupData.gameserver.id,
293
297
  });
294
298
 
@@ -7,12 +7,18 @@ import {
7
7
  EventsAwaiter,
8
8
  } from '@takaro/test';
9
9
  import { GameEvents } from '../dto/index.js';
10
+ import { describe } from 'node:test';
10
11
 
11
12
  const group = 'Module permissions role assignments';
12
13
 
13
14
  async function cleanRoleSetup(this: IntegrationTest<IModuleTestsSetupData>) {
14
15
  const defaultSetup = await modulesTestSetup.bind(this)();
15
16
 
17
+ await this.client.module.moduleInstallationsControllerInstallModule({
18
+ gameServerId: defaultSetup.gameserver.id,
19
+ versionId: defaultSetup.teleportsModule.latestVersion.id,
20
+ });
21
+
16
22
  const playersRes = await this.client.player.playerControllerSearch();
17
23
 
18
24
  const permissions = await this.client.permissionCodesToInputs(['TELEPORTS_USE']);
@@ -22,10 +28,10 @@ async function cleanRoleSetup(this: IntegrationTest<IModuleTestsSetupData>) {
22
28
  permissions,
23
29
  });
24
30
 
25
- await this.client.gameserver.gameServerControllerInstallModule(
26
- defaultSetup.gameserver.id,
27
- defaultSetup.teleportsModule.id,
28
- );
31
+ await this.client.module.moduleInstallationsControllerInstallModule({
32
+ gameServerId: defaultSetup.gameserver.id,
33
+ versionId: defaultSetup.teleportsModule.latestVersion.id,
34
+ });
29
35
 
30
36
  await Promise.all(
31
37
  playersRes.data.data.map(async (player) => {
@@ -128,15 +134,13 @@ const tests = [
128
134
  setup: modulesTestSetup,
129
135
  name: 'Uses system roles',
130
136
  test: async function () {
131
- await this.client.gameserver.gameServerControllerInstallModule(
132
- this.setupData.gameserver.id,
133
- this.setupData.teleportsModule.id,
134
- {
135
- userConfig: JSON.stringify({
136
- timeout: 0,
137
- }),
138
- },
139
- );
137
+ await this.client.module.moduleInstallationsControllerInstallModule({
138
+ gameServerId: this.setupData.gameserver.id,
139
+ versionId: this.setupData.teleportsModule.latestVersion.id,
140
+ userConfig: JSON.stringify({
141
+ timeout: 0,
142
+ }),
143
+ });
140
144
 
141
145
  await Promise.all(
142
146
  this.setupData.players.map(async (player) => {
@@ -1,36 +1,31 @@
1
1
  import { IntegrationTest, expect, IModuleTestsSetupData, modulesTestSetup, EventsAwaiter } from '@takaro/test';
2
- import { EventPlayerConnected, GameEvents } from '../dto/gameEvents.js';
2
+ import { GameEvents } from '../dto/gameEvents.js';
3
3
  import { HookEvents } from '../main.js';
4
+ import { faker } from '@faker-js/faker';
5
+ import { describe } from 'node:test';
4
6
 
5
7
  const group = 'Onboarding';
6
8
  const groupStarterkit = 'Onboarding - Starterkit';
7
9
 
8
- const _tests = [
10
+ const tests = [
9
11
  new IntegrationTest<IModuleTestsSetupData>({
10
12
  group,
11
13
  snapshot: false,
12
14
  setup: modulesTestSetup,
13
15
  name: 'PlayerConnected hook sends a message when a player connects to the server',
14
16
  test: async function () {
15
- await this.client.gameserver.gameServerControllerInstallModule(
16
- this.setupData.gameserver.id,
17
- this.setupData.onboardingModule.id,
18
- );
19
- const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE);
20
- await this.client.hook.hookControllerTrigger({
17
+ await this.client.module.moduleInstallationsControllerInstallModule({
21
18
  gameServerId: this.setupData.gameserver.id,
22
- playerId: this.setupData.players[0].id,
23
- eventType: GameEvents.PLAYER_CONNECTED,
24
- eventMeta: new EventPlayerConnected({
25
- player: {
26
- gameId: '1',
27
- },
28
- msg: 'Player connected',
29
- }),
19
+ versionId: this.setupData.onboardingModule.latestVersion.id,
20
+ });
21
+ const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 5);
22
+ await this.client.gameserver.gameServerControllerExecuteCommand(this.setupData.gameserver.id, {
23
+ command: 'connectAll',
30
24
  });
31
25
 
32
- expect((await events).length).to.be.eq(1);
33
- expect((await events)[0].data.meta.msg).to.match(/Welcome .+ to the server!/);
26
+ expect((await events).length).to.be.eq(5);
27
+ // Expect all messages to match
28
+ expect((await events).every((event) => event.data.meta.msg.match(/Welcome .+ to the server!/))).to.be.true;
34
29
  },
35
30
  }),
36
31
  new IntegrationTest<IModuleTestsSetupData>({
@@ -39,15 +34,18 @@ const _tests = [
39
34
  setup: modulesTestSetup,
40
35
  name: 'Starterkit command gives the player items',
41
36
  test: async function () {
42
- await this.client.gameserver.gameServerControllerInstallModule(
43
- this.setupData.gameserver.id,
44
- this.setupData.onboardingModule.id,
45
- {
46
- userConfig: JSON.stringify({
47
- starterKitItems: ['cigar'],
48
- }),
49
- },
50
- );
37
+ const items = (await this.client.item.itemControllerSearch()).data.data;
38
+ await this.client.module.moduleInstallationsControllerInstallModule({
39
+ gameServerId: this.setupData.gameserver.id,
40
+ versionId: this.setupData.onboardingModule.latestVersion.id,
41
+ userConfig: JSON.stringify({
42
+ starterKitItems: items.map((item) => ({
43
+ item: item.id,
44
+ amount: faker.number.int({ min: 1, max: 6 }),
45
+ quality: faker.number.int({ min: 1, max: 6 }).toString(),
46
+ })),
47
+ }),
48
+ });
51
49
  const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(HookEvents.COMMAND_EXECUTED);
52
50
  await this.client.command.commandControllerTrigger(this.setupData.gameserver.id, {
53
51
  msg: '/starterkit',
@@ -64,15 +62,18 @@ const _tests = [
64
62
  setup: modulesTestSetup,
65
63
  name: 'Starterkit command can only be used once',
66
64
  test: async function () {
67
- await this.client.gameserver.gameServerControllerInstallModule(
68
- this.setupData.gameserver.id,
69
- this.setupData.onboardingModule.id,
70
- {
71
- userConfig: JSON.stringify({
72
- starterKitItems: ['cigar'],
73
- }),
74
- },
75
- );
65
+ const items = (await this.client.item.itemControllerSearch()).data.data;
66
+ await this.client.module.moduleInstallationsControllerInstallModule({
67
+ gameServerId: this.setupData.gameserver.id,
68
+ versionId: this.setupData.onboardingModule.latestVersion.id,
69
+ userConfig: JSON.stringify({
70
+ starterKitItems: items.map((item) => ({
71
+ item: item.id,
72
+ amount: faker.number.int({ min: 1, max: 6 }),
73
+ quality: faker.number.int({ min: 1, max: 6 }).toString(),
74
+ })),
75
+ }),
76
+ });
76
77
  const firstEvents = (await new EventsAwaiter().connect(this.client)).waitForEvents(HookEvents.COMMAND_EXECUTED);
77
78
  await this.client.command.commandControllerTrigger(this.setupData.gameserver.id, {
78
79
  msg: '/starterkit',
@@ -98,10 +99,10 @@ const _tests = [
98
99
  setup: modulesTestSetup,
99
100
  name: 'Starterkit with nothing configured, shows an error message',
100
101
  test: async function () {
101
- await this.client.gameserver.gameServerControllerInstallModule(
102
- this.setupData.gameserver.id,
103
- this.setupData.onboardingModule.id,
104
- );
102
+ await this.client.module.moduleInstallationsControllerInstallModule({
103
+ gameServerId: this.setupData.gameserver.id,
104
+ versionId: this.setupData.onboardingModule.latestVersion.id,
105
+ });
105
106
  const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 1);
106
107
  await this.client.command.commandControllerTrigger(this.setupData.gameserver.id, {
107
108
  msg: '/starterkit',
@@ -114,9 +115,8 @@ const _tests = [
114
115
  }),
115
116
  ];
116
117
 
117
- // Temp disabled...
118
- /* describe(group, function () {
118
+ describe(group, function () {
119
119
  tests.forEach((test) => {
120
120
  test.run();
121
121
  });
122
- }); */
122
+ });
@@ -1,5 +1,6 @@
1
1
  import { IntegrationTest, expect, IModuleTestsSetupData, modulesTestSetup, EventsAwaiter } from '@takaro/test';
2
2
  import { HookEvents } from '../dto/index.js';
3
+ import { describe } from 'node:test';
3
4
 
4
5
  const group = 'Ping command';
5
6
 
@@ -10,10 +11,10 @@ const tests = [
10
11
  setup: modulesTestSetup,
11
12
  name: 'Ping command replies with pong',
12
13
  test: async function () {
13
- await this.client.gameserver.gameServerControllerInstallModule(
14
- this.setupData.gameserver.id,
15
- this.setupData.utilsModule.id,
16
- );
14
+ await this.client.module.moduleInstallationsControllerInstallModule({
15
+ gameServerId: this.setupData.gameserver.id,
16
+ versionId: this.setupData.utilsModule.latestVersion.id,
17
+ });
17
18
 
18
19
  const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(HookEvents.CHAT_MESSAGE);
19
20
 
@@ -1,5 +1,6 @@
1
1
  import { IntegrationTest, expect, IModuleTestsSetupData, modulesTestSetup, EventsAwaiter } from '@takaro/test';
2
2
  import { GameEvents } from '../dto/index.js';
3
+ import { describe } from 'node:test';
3
4
 
4
5
  const group = 'Role expiry';
5
6
 
@@ -15,10 +16,10 @@ const tests = [
15
16
  this.setupData.players.map((p) => this.client.player.playerControllerRemoveRole(p.id, this.setupData.role.id)),
16
17
  );
17
18
 
18
- await this.client.gameserver.gameServerControllerInstallModule(
19
- this.setupData.gameserver.id,
20
- this.setupData.teleportsModule.id,
21
- );
19
+ await this.client.module.moduleInstallationsControllerInstallModule({
20
+ gameServerId: this.setupData.gameserver.id,
21
+ versionId: this.setupData.teleportsModule.latestVersion.id,
22
+ });
22
23
 
23
24
  const eventsBeforeRole = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE);
24
25
 
@@ -1,5 +1,6 @@
1
1
  import { IntegrationTest, expect, IModuleTestsSetupData, modulesTestSetup, EventsAwaiter } from '@takaro/test';
2
2
  import { GameEvents } from '../dto/index.js';
3
+ import { describe } from 'node:test';
3
4
 
4
5
  const group = 'Server messages';
5
6
 
@@ -10,15 +11,15 @@ const tests = [
10
11
  setup: modulesTestSetup,
11
12
  name: 'Default install sends the default message',
12
13
  test: async function () {
13
- await this.client.gameserver.gameServerControllerInstallModule(
14
- this.setupData.gameserver.id,
15
- this.setupData.serverMessagesModule.id,
16
- );
14
+ await this.client.module.moduleInstallationsControllerInstallModule({
15
+ gameServerId: this.setupData.gameserver.id,
16
+ versionId: this.setupData.serverMessagesModule.latestVersion.id,
17
+ });
17
18
 
18
19
  const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE);
19
20
 
20
21
  await this.client.cronjob.cronJobControllerTrigger({
21
- cronjobId: this.setupData.serverMessagesModule.cronJobs[0].id,
22
+ cronjobId: this.setupData.serverMessagesModule.latestVersion.cronJobs[0].id,
22
23
  gameServerId: this.setupData.gameserver.id,
23
24
  moduleId: this.setupData.serverMessagesModule.id,
24
25
  });
@@ -36,20 +37,18 @@ const tests = [
36
37
  setup: modulesTestSetup,
37
38
  name: 'Can override default message via userConfig',
38
39
  test: async function () {
39
- await this.client.gameserver.gameServerControllerInstallModule(
40
- this.setupData.gameserver.id,
41
- this.setupData.serverMessagesModule.id,
42
- {
43
- userConfig: JSON.stringify({
44
- messages: ['This is a custom message'],
45
- }),
46
- },
47
- );
40
+ await this.client.module.moduleInstallationsControllerInstallModule({
41
+ gameServerId: this.setupData.gameserver.id,
42
+ versionId: this.setupData.serverMessagesModule.latestVersion.id,
43
+ userConfig: JSON.stringify({
44
+ messages: ['This is a custom message'],
45
+ }),
46
+ });
48
47
 
49
48
  const events = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE);
50
49
 
51
50
  await this.client.cronjob.cronJobControllerTrigger({
52
- cronjobId: this.setupData.serverMessagesModule.cronJobs[0].id,
51
+ cronjobId: this.setupData.serverMessagesModule.latestVersion.cronJobs[0].id,
53
52
  gameServerId: this.setupData.gameserver.id,
54
53
  moduleId: this.setupData.serverMessagesModule.id,
55
54
  });
@@ -64,22 +63,20 @@ const tests = [
64
63
  setup: modulesTestSetup,
65
64
  name: 'Can override default message via userConfig with multiple messages',
66
65
  test: async function () {
67
- await this.client.gameserver.gameServerControllerInstallModule(
68
- this.setupData.gameserver.id,
69
- this.setupData.serverMessagesModule.id,
70
- {
71
- userConfig: JSON.stringify({
72
- messages: ['Test message 1', 'Test message 2'],
73
- }),
74
- },
75
- );
66
+ await this.client.module.moduleInstallationsControllerInstallModule({
67
+ gameServerId: this.setupData.gameserver.id,
68
+ versionId: this.setupData.serverMessagesModule.latestVersion.id,
69
+ userConfig: JSON.stringify({
70
+ messages: ['Test message 1', 'Test message 2'],
71
+ }),
72
+ });
76
73
 
77
74
  // We should see each of our test messages at least once
78
75
 
79
76
  const firstEvents = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 1);
80
77
 
81
78
  await this.client.cronjob.cronJobControllerTrigger({
82
- cronjobId: this.setupData.serverMessagesModule.cronJobs[0].id,
79
+ cronjobId: this.setupData.serverMessagesModule.latestVersion.cronJobs[0].id,
83
80
  gameServerId: this.setupData.gameserver.id,
84
81
  moduleId: this.setupData.serverMessagesModule.id,
85
82
  });
@@ -90,7 +87,7 @@ const tests = [
90
87
  const secondEvents = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 1);
91
88
 
92
89
  await this.client.cronjob.cronJobControllerTrigger({
93
- cronjobId: this.setupData.serverMessagesModule.cronJobs[0].id,
90
+ cronjobId: this.setupData.serverMessagesModule.latestVersion.cronJobs[0].id,
94
91
  gameServerId: this.setupData.gameserver.id,
95
92
  moduleId: this.setupData.serverMessagesModule.id,
96
93
  });
@@ -102,7 +99,7 @@ const tests = [
102
99
  const thirdEvents = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 1);
103
100
 
104
101
  await this.client.cronjob.cronJobControllerTrigger({
105
- cronjobId: this.setupData.serverMessagesModule.cronJobs[0].id,
102
+ cronjobId: this.setupData.serverMessagesModule.latestVersion.cronJobs[0].id,
106
103
  gameServerId: this.setupData.gameserver.id,
107
104
  moduleId: this.setupData.serverMessagesModule.id,
108
105
  });
@@ -1,12 +1,15 @@
1
1
  import { IntegrationTest, expect, IModuleTestsSetupData, modulesTestSetup, EventsAwaiter } from '@takaro/test';
2
2
  import { HookEvents } from '../dto/index.js';
3
+ import { describe } from 'node:test';
3
4
 
4
5
  const group = 'System config - cooldown';
5
6
 
6
7
  const customSetup = async function (this: IntegrationTest<IModuleTestsSetupData>): Promise<IModuleTestsSetupData> {
7
8
  const setupData = await modulesTestSetup.bind(this)();
8
9
 
9
- await this.client.gameserver.gameServerControllerInstallModule(setupData.gameserver.id, setupData.utilsModule.id, {
10
+ await this.client.module.moduleInstallationsControllerInstallModule({
11
+ gameServerId: setupData.gameserver.id,
12
+ versionId: setupData.utilsModule.latestVersion.id,
10
13
  systemConfig: JSON.stringify({
11
14
  commands: {
12
15
  ping: {
@@ -48,6 +51,7 @@ const tests = [
48
51
  new IntegrationTest<IModuleTestsSetupData>({
49
52
  group,
50
53
  snapshot: false,
54
+ attempts: 5,
51
55
  setup: customSetup,
52
56
  name: 'Handles cooldown when using commands in rapid succession',
53
57
  test: async function () {
@@ -1,6 +1,7 @@
1
1
  import { IntegrationTest, expect, IModuleTestsSetupData, modulesTestSetup, EventsAwaiter } from '@takaro/test';
2
2
  import { GameEvents } from '../dto/index.js';
3
3
  import { sleep } from '@takaro/util';
4
+ import { describe } from 'node:test';
4
5
 
5
6
  const group = 'System config - cost';
6
7
 
@@ -11,24 +12,22 @@ const customSetup = async function (this: IntegrationTest<IModuleTestsSetupData>
11
12
  gameServerId: setupData.gameserver.id,
12
13
  });
13
14
 
14
- await this.client.gameserver.gameServerControllerInstallModule(
15
- setupData.gameserver.id,
16
- setupData.teleportsModule.id,
17
- {
18
- userConfig: JSON.stringify({
19
- timeout: 0,
20
- }),
21
- systemConfig: JSON.stringify({
22
- commands: {
23
- teleport: {
24
- delay: 0,
25
- aliases: [],
26
- cost: 10,
27
- },
15
+ await this.client.module.moduleInstallationsControllerInstallModule({
16
+ gameServerId: setupData.gameserver.id,
17
+ versionId: setupData.teleportsModule.latestVersion.id,
18
+ userConfig: JSON.stringify({
19
+ timeout: 0,
20
+ }),
21
+ systemConfig: JSON.stringify({
22
+ commands: {
23
+ teleport: {
24
+ delay: 0,
25
+ aliases: [],
26
+ cost: 10,
28
27
  },
29
- }),
30
- },
31
- );
28
+ },
29
+ }),
30
+ });
32
31
 
33
32
  const setEvents = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 1);
34
33
  await this.client.command.commandControllerTrigger(setupData.gameserver.id, {
@@ -1,5 +1,6 @@
1
1
  import { IntegrationTest, expect, IModuleTestsSetupData, modulesTestSetup, EventsAwaiter } from '@takaro/test';
2
2
  import { GameEvents } from '../../dto/index.js';
3
+ import { describe } from 'node:test';
3
4
 
4
5
  const group = 'Teleports suite';
5
6
 
@@ -10,10 +11,10 @@ const tests = [
10
11
  setup: modulesTestSetup,
11
12
  name: 'Can list teleports with /tplist',
12
13
  test: async function () {
13
- await this.client.gameserver.gameServerControllerInstallModule(
14
- this.setupData.gameserver.id,
15
- this.setupData.teleportsModule.id,
16
- );
14
+ await this.client.module.moduleInstallationsControllerInstallModule({
15
+ gameServerId: this.setupData.gameserver.id,
16
+ versionId: this.setupData.teleportsModule.latestVersion.id,
17
+ });
17
18
 
18
19
  const setEvents = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 3);
19
20
 
@@ -52,15 +53,13 @@ const tests = [
52
53
  setup: modulesTestSetup,
53
54
  name: 'Public teleports show up in /tplist',
54
55
  test: async function () {
55
- await this.client.gameserver.gameServerControllerInstallModule(
56
- this.setupData.gameserver.id,
57
- this.setupData.teleportsModule.id,
58
- {
59
- userConfig: JSON.stringify({
60
- allowPublicTeleports: true,
61
- }),
62
- },
63
- );
56
+ await this.client.module.moduleInstallationsControllerInstallModule({
57
+ gameServerId: this.setupData.gameserver.id,
58
+ versionId: this.setupData.teleportsModule.latestVersion.id,
59
+ userConfig: JSON.stringify({
60
+ allowPublicTeleports: true,
61
+ }),
62
+ });
64
63
 
65
64
  const setTpEvent = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 1);
66
65
 
@@ -110,10 +109,10 @@ const tests = [
110
109
  setup: modulesTestSetup,
111
110
  name: 'Teleports set by player A cannot be seen by player B with /tplist',
112
111
  test: async function () {
113
- await this.client.gameserver.gameServerControllerInstallModule(
114
- this.setupData.gameserver.id,
115
- this.setupData.teleportsModule.id,
116
- );
112
+ await this.client.module.moduleInstallationsControllerInstallModule({
113
+ gameServerId: this.setupData.gameserver.id,
114
+ versionId: this.setupData.teleportsModule.latestVersion.id,
115
+ });
117
116
 
118
117
  const setTpEvent = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 1);
119
118
 
@@ -145,10 +144,10 @@ const tests = [
145
144
  // eslint-disable-next-line quotes
146
145
  name: "bug repro /tplist: Player A and B have teleports set but B cannot see A's teleports",
147
146
  test: async function () {
148
- await this.client.gameserver.gameServerControllerInstallModule(
149
- this.setupData.gameserver.id,
150
- this.setupData.teleportsModule.id,
151
- );
147
+ await this.client.module.moduleInstallationsControllerInstallModule({
148
+ gameServerId: this.setupData.gameserver.id,
149
+ versionId: this.setupData.teleportsModule.latestVersion.id,
150
+ });
152
151
 
153
152
  const setTpEvent = (await new EventsAwaiter().connect(this.client)).waitForEvents(GameEvents.CHAT_MESSAGE, 1);
154
153