highrise.bot 1.0.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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +86 -0
  3. package/index.js +13 -0
  4. package/package.json +29 -0
  5. package/src/classes/Actions/Awaiter.js +203 -0
  6. package/src/classes/Actions/Channel.js +327 -0
  7. package/src/classes/Actions/Direct.js +390 -0
  8. package/src/classes/Actions/Inventory.js +193 -0
  9. package/src/classes/Actions/Music.js +243 -0
  10. package/src/classes/Actions/Outfit.js +175 -0
  11. package/src/classes/Actions/Player.js +604 -0
  12. package/src/classes/Actions/Public.js +143 -0
  13. package/src/classes/Actions/Room.js +495 -0
  14. package/src/classes/Actions/Utils.js +77 -0
  15. package/src/classes/Actions/lib/AudioStreaming.js +695 -0
  16. package/src/classes/Caches/MovementCache.js +364 -0
  17. package/src/classes/Handlers/AxiosErrorHandler.js +68 -0
  18. package/src/classes/Handlers/ErrorHandler.js +65 -0
  19. package/src/classes/Handlers/EventHandlers.js +193 -0
  20. package/src/classes/Handlers/WebSocketHandlers.js +126 -0
  21. package/src/classes/Managers/CooldownManager.js +516 -0
  22. package/src/classes/Managers/DanceFloorManagers.js +609 -0
  23. package/src/classes/Managers/Helpers/CleanupManager.js +130 -0
  24. package/src/classes/Managers/Helpers/HighriseError.js +107 -0
  25. package/src/classes/Managers/Helpers/HighriseResponse.js +33 -0
  26. package/src/classes/Managers/Helpers/LoggerManager.js +171 -0
  27. package/src/classes/Managers/Helpers/MetricsManager.js +83 -0
  28. package/src/classes/Managers/Networking/ConnectionManager.js +253 -0
  29. package/src/classes/Managers/Networking/EventsManager.js +64 -0
  30. package/src/classes/Managers/Networking/KeepAliveManager.js +58 -0
  31. package/src/classes/Managers/Networking/MessageHandler.js +123 -0
  32. package/src/classes/Managers/Networking/Request.js +323 -0
  33. package/src/classes/Managers/RoleManager.js +322 -0
  34. package/src/classes/WebApi/Category/Grab.js +98 -0
  35. package/src/classes/WebApi/Category/Item.js +347 -0
  36. package/src/classes/WebApi/Category/Post.js +154 -0
  37. package/src/classes/WebApi/Category/Room.js +137 -0
  38. package/src/classes/WebApi/Category/User.js +88 -0
  39. package/src/classes/WebApi/webapi.js +52 -0
  40. package/src/constants/ErrorConstants.js +109 -0
  41. package/src/constants/TypesConstants.js +91 -0
  42. package/src/constants/WebSocketConstants.js +78 -0
  43. package/src/core/Highrise.js +192 -0
  44. package/src/core/HighriseWebsocket.js +242 -0
  45. package/src/utils/ConvertSvgToPng.js +51 -0
  46. package/src/utils/Job.js +130 -0
  47. package/src/utils/ModelPool.js +160 -0
  48. package/src/utils/Models.js +128 -0
  49. package/src/utils/versionCheck.js +27 -0
  50. package/src/validators/ConfigValidator.js +195 -0
  51. package/src/validators/ConnectionValidator.js +65 -0
  52. package/typings/index.d.ts +5042 -0
@@ -0,0 +1,604 @@
1
+ const { reactions, gold_bars, FacingTypes } = require("highrise.js/src/constants/TypesConstants");
2
+ const ErrorConstants = require('highrise.js/src/constants/ErrorConstants');
3
+
4
+ class PlayerClass {
5
+ constructor(bot) {
6
+ this.bot = bot;
7
+
8
+ this.HighriseError = bot.HighriseError;
9
+ this.HighriseResponse = bot.HighriseResponse;
10
+ }
11
+
12
+ async walk(x, y, z, facing = 'FrontRight') {
13
+ try {
14
+ if (typeof x !== 'number' || typeof y !== 'number' || typeof z !== 'number') {
15
+ return new this.HighriseError(
16
+ ErrorConstants.VALIDATION.INVALID_COORDINATES,
17
+ 'Coordinates must be numbers',
18
+ { x, y, z }
19
+ ).toResult();
20
+ }
21
+
22
+ if (typeof facing !== 'string' || !FacingTypes.includes(facing)) {
23
+ return new this.HighriseError(
24
+ ErrorConstants.VALIDATION.INVALID_FACING,
25
+ `Facing must be a valid facing string ( ${FacingTypes.join(', ')} )`,
26
+ { facing }
27
+ ).toResult();
28
+ }
29
+
30
+ const destination = { x, y, z, facing };
31
+ const payload = {
32
+ _type: 'FloorHitRequest',
33
+ destination: destination
34
+ };
35
+
36
+ const response = await this.bot._fireAndForget.send(payload);
37
+
38
+ if (response.success) {
39
+ return this.HighriseResponse.success('walked', {
40
+ position: { x, y, z, facing },
41
+ timestamp: Date.now()
42
+ });
43
+ }
44
+ } catch (error) {
45
+ return new this.HighriseError(
46
+ ErrorConstants.HIGHRISE_API.API_SERVER_ERROR,
47
+ `Failed to walk: ${error.message}`,
48
+ { x, y, z, facing }
49
+ ).toResult();
50
+ }
51
+ }
52
+
53
+ async sit(entity_id, anchor_ix = 0) {
54
+ try {
55
+ if (typeof entity_id !== 'string' || !entity_id.trim()) {
56
+ return new this.HighriseError(
57
+ ErrorConstants.VALIDATION.INVALID_PARAMETER,
58
+ 'Entity ID must be a non-empty string',
59
+ { entity_id }
60
+ ).toResult();
61
+ }
62
+
63
+ if (typeof anchor_ix !== 'number' || anchor_ix < 0) {
64
+ return new this.HighriseError(
65
+ ErrorConstants.VALIDATION.INVALID_PARAMETER,
66
+ 'Anchor index must be a positive number',
67
+ { anchor_ix }
68
+ ).toResult();
69
+ }
70
+
71
+ const anchor = { entity_id, anchor_ix };
72
+ const payload = {
73
+ _type: 'AnchorHitRequest',
74
+ anchor: anchor
75
+ };
76
+
77
+ const response = await this.bot._fireAndForget.send(payload);
78
+
79
+ if (response.success) {
80
+ return this.HighriseResponse.success('sat', {
81
+ entity_id, anchor_ix,
82
+ timestamp: Date.now()
83
+ });
84
+ }
85
+ } catch (error) {
86
+ return new this.HighriseError(
87
+ ErrorConstants.HIGHRISE_API.API_SERVER_ERROR,
88
+ `Failed to sit: ${error.message}`,
89
+ { entity_id, anchor_ix }
90
+ ).toResult();
91
+ }
92
+ }
93
+
94
+ async teleport(user_id, x, y, z, facing = 'FrontRight') {
95
+ try {
96
+ if (typeof user_id !== 'string' || !user_id.trim()) {
97
+ return this.HighriseError.invalidUserId(user_id).toResult();
98
+ }
99
+
100
+ if (typeof x !== 'number' || typeof y !== 'number' || typeof z !== 'number') {
101
+ return new this.HighriseError(
102
+ ErrorConstants.VALIDATION.INVALID_COORDINATES,
103
+ 'Coordinates must be numbers',
104
+ { x, y, z }
105
+ ).toResult();
106
+ }
107
+
108
+ if (typeof facing !== 'string' || !FacingTypes.includes(facing)) {
109
+ return new this.HighriseError(
110
+ ErrorConstants.VALIDATION.INVALID_FACING,
111
+ `Facing must be a valid facing string ( ${FacingTypes.join(', ')} )`,
112
+ { facing }
113
+ ).toResult();
114
+ }
115
+
116
+ const payload = {
117
+ _type: 'TeleportRequest',
118
+ user_id: user_id,
119
+ destination: { x, y, z, facing }
120
+ };
121
+
122
+ const response = await this.bot._fireAndForget.send(payload);
123
+
124
+ if (response.success) {
125
+ return this.HighriseResponse.success('teleported', {
126
+ user_id, position: { x, y, z, facing },
127
+ timestamp: Date.now()
128
+ });
129
+ }
130
+ } catch (error) {
131
+ return new this.HighriseError(
132
+ ErrorConstants.HIGHRISE_API.API_SERVER_ERROR,
133
+ `Failed to teleport: ${error.message}`,
134
+ { user_id, position: { x, y, z, facing } }
135
+ ).toResult();
136
+ }
137
+ }
138
+
139
+ async transport(user_id, room_id) {
140
+ try {
141
+ if (typeof user_id !== 'string' || !user_id.trim()) {
142
+ return this.HighriseError.invalidUserId(user_id).toResult();
143
+ }
144
+
145
+ if (typeof room_id !== 'string' || !room_id.trim()) {
146
+ return new this.HighriseError(
147
+ ErrorConstants.VALIDATION.INVALID_ROOM_ID,
148
+ 'Room ID must be a non-empty string',
149
+ { room_id }
150
+ ).toResult();
151
+ }
152
+
153
+ if (user_id === this.bot.info.user?.id) {
154
+ return new this.HighriseError(
155
+ ErrorConstants.ROOM.CANNOT_TRANSPORT_SELF,
156
+ 'Cannot transport self to another room',
157
+ { user_id, bot_id: this.bot.info.user?.id }
158
+ ).toResult();
159
+ }
160
+
161
+ const payload = {
162
+ _type: 'MoveUserToRoomRequest',
163
+ user_id: user_id,
164
+ room_id: room_id
165
+ };
166
+
167
+ const response = await this.bot._fireAndForget.send(payload);
168
+
169
+ if (response.success) {
170
+ return this.HighriseResponse.success('transported', {
171
+ user_id, room_id,
172
+ timestamp: Date.now()
173
+ });
174
+ }
175
+ } catch (error) {
176
+ return new this.HighriseError(
177
+ ErrorConstants.HIGHRISE_API.API_SERVER_ERROR,
178
+ `Failed to transport user: ${error.message}`,
179
+ { user_id, room_id }
180
+ ).toResult();
181
+ }
182
+ }
183
+
184
+ async emote(emote_id, user_id) {
185
+ try {
186
+ if (typeof emote_id !== 'string' || !emote_id.trim()) {
187
+ return new this.HighriseError(
188
+ ErrorConstants.VALIDATION.INVALID_EMOTE_ID,
189
+ 'Emote ID must be a non-empty string',
190
+ { emote_id }
191
+ ).toResult();
192
+ }
193
+
194
+ if (user_id !== undefined && (typeof user_id !== 'string' || !user_id.trim())) {
195
+ return this.HighriseError.invalidUserId(user_id).toResult();
196
+ }
197
+
198
+ const payload = {
199
+ _type: 'EmoteRequest',
200
+ emote_id: emote_id,
201
+ target_user_id: user_id
202
+ };
203
+
204
+ const response = await this.bot._fireAndForget.send(payload);
205
+
206
+ if (response.success) {
207
+ return this.HighriseResponse.success('emoted', {
208
+ emote_id, user_id,
209
+ timestamp: Date.now()
210
+ });
211
+ }
212
+ } catch (error) {
213
+ return new this.HighriseError(
214
+ ErrorConstants.HIGHRISE_API.API_SERVER_ERROR,
215
+ `Failed to play emote: ${error.message}`,
216
+ { emote_id, user_id }
217
+ ).toResult();
218
+ }
219
+ }
220
+
221
+ async react(user_id, reaction) {
222
+ try {
223
+ if (typeof user_id !== 'string' || !user_id.trim()) {
224
+ return this.HighriseError.invalidUserId(user_id).toResult();
225
+ }
226
+
227
+ if (typeof reaction !== 'string' || !reaction.trim()) {
228
+ return new this.HighriseError(
229
+ ErrorConstants.VALIDATION.INVALID_REACTION,
230
+ 'Reaction must be a non-empty string',
231
+ { reaction }
232
+ ).toResult();
233
+ }
234
+
235
+ if (!reactions.includes(reaction)) {
236
+ return new this.HighriseError(
237
+ ErrorConstants.VALIDATION.INVALID_REACTION,
238
+ `Invalid reaction: ${reaction}`,
239
+ { reaction, valid_reactions: reactions }
240
+ ).toResult();
241
+ }
242
+
243
+ const payload = {
244
+ _type: 'ReactionRequest',
245
+ reaction: reaction,
246
+ target_user_id: user_id
247
+ };
248
+
249
+ const response = await this.bot._fireAndForget.send(payload);
250
+
251
+ if (response.success) {
252
+ return this.HighriseResponse.success('reacted', {
253
+ user_id, reaction,
254
+ timestamp: Date.now()
255
+ });
256
+ }
257
+ } catch (error) {
258
+ return new this.HighriseError(
259
+ ErrorConstants.HIGHRISE_API.API_SERVER_ERROR,
260
+ `Failed to send reaction: ${error.message}`,
261
+ { user_id, reaction }
262
+ ).toResult();
263
+ }
264
+ }
265
+
266
+ async tip(user_id, gold_bar = 1) {
267
+ try {
268
+
269
+ const PayladGoldBars = {
270
+ 1: "gold_bar_1",
271
+ 5: "gold_bar_5",
272
+ 10: "gold_bar_10",
273
+ 50: "gold_bar_50",
274
+ 100: "gold_bar_100",
275
+ 500: "gold_bar_500",
276
+ 1000: "gold_bar_1k",
277
+ 5000: "gold_bar_5000",
278
+ 10000: "gold_bar_10k"
279
+ };
280
+
281
+ if (typeof user_id !== 'string' || !user_id.trim()) {
282
+ return this.HighriseError.invalidUserId(user_id).toResult();
283
+ }
284
+
285
+ if (typeof gold_bar !== 'number' || gold_bar <= 0 || gold_bar > 10000) {
286
+ return new this.HighriseError(
287
+ ErrorConstants.VALIDATION.INVALID_GOLDBARS,
288
+ 'Gold bar amount must be a positive number between 1 and 10000',
289
+ { gold_bar }
290
+ ).toResult();
291
+ }
292
+
293
+ if (!gold_bars.includes(gold_bar)) {
294
+ return new this.HighriseError(
295
+ ErrorConstants.VALIDATION.INVALID_GOLDBARS,
296
+ `Invalid gold bar amount: ${gold_bar}`,
297
+ { gold_bar, valid_amounts: gold_bars }
298
+ ).toResult();
299
+ }
300
+
301
+ if (user_id === this.bot.info.user?.id) {
302
+ return new this.HighriseError(
303
+ ErrorConstants.PERMISSION.CANNOT_TIP_SELF,
304
+ 'Cannot tip yourself',
305
+ { user_id }
306
+ ).toResult();
307
+ }
308
+
309
+ const payload = {
310
+ _type: 'TipUserRequest',
311
+ user_id: user_id,
312
+ gold_bar: PayladGoldBars[gold_bar]
313
+ };
314
+
315
+ const response = await this.bot._fireAndForget.send(payload);
316
+
317
+ if (response.success) {
318
+ return this.HighriseResponse.success('tipped', {
319
+ user_id, gold_bar,
320
+ timestamp: Date.now()
321
+ });
322
+ }
323
+ } catch (error) {
324
+ return new this.HighriseError(
325
+ ErrorConstants.HIGHRISE_API.API_SERVER_ERROR,
326
+ `Failed to tip user: ${error.message}`,
327
+ { user_id, gold_bar }
328
+ ).toResult();
329
+ }
330
+ }
331
+
332
+ async splitTip(user_id, amount, delay = 300) {
333
+ try {
334
+ if (typeof user_id !== 'string' || !user_id.trim()) {
335
+ return this.HighriseError.invalidUserId(user_id).toResult();
336
+ }
337
+
338
+ if (typeof amount !== 'number' || amount <= 0) {
339
+ return new this.HighriseError(
340
+ ErrorConstants.VALIDATION.INVALID_GOLDBARS,
341
+ 'Amount must be a positive number',
342
+ { amount }
343
+ ).toResult();
344
+ }
345
+
346
+ const splitAmounts = this.bot.utils.sequencingGoldBars(amount);
347
+
348
+ const results = [];
349
+ for (const goldBar of splitAmounts) {
350
+ const result = await this.tip(user_id, goldBar);
351
+ results.push(result);
352
+
353
+ if (delay > 0 && goldBar !== splitAmounts[splitAmounts.length - 1]) {
354
+ await this.bot.utils.sleep(delay);
355
+ }
356
+ }
357
+
358
+ return this.HighriseResponse.success('split_tipped', {
359
+ user_id,
360
+ original_amount: amount,
361
+ split_amounts: splitAmounts,
362
+ results: results,
363
+ timestamp: Date.now()
364
+ });
365
+ } catch (error) {
366
+ return new this.HighriseError(
367
+ ErrorConstants.HIGHRISE_API.API_SERVER_ERROR,
368
+ `Failed to split tip: ${error.message}`,
369
+ { user_id, amount }
370
+ ).toResult();
371
+ }
372
+ }
373
+
374
+ outfit = {
375
+ get: async (user_id) => {
376
+ try {
377
+ if (typeof user_id !== 'string' || !user_id.trim()) {
378
+ return this.HighriseError.invalidUserId(user_id).toResult();
379
+ }
380
+
381
+ const payload = {
382
+ _type: 'GetUserOutfitRequest',
383
+ user_id: user_id
384
+ };
385
+
386
+ const response = await this.bot._requestResponse.send(payload);
387
+ if (response.success) {
388
+ return this.HighriseResponse.success('outfit', {
389
+ user_id,
390
+ items: response.data.outfit || [],
391
+ count: (response.data.outfit || []).length
392
+ });
393
+ }
394
+ } catch (error) {
395
+ return new this.HighriseError(
396
+ ErrorConstants.HIGHRISE_API.API_SERVER_ERROR,
397
+ `Failed to get user outfit: ${error.message}`,
398
+ { user_id }
399
+ ).toResult();
400
+ }
401
+ }
402
+ }
403
+
404
+ moderation = {
405
+ kick: async (user_id) => {
406
+ try {
407
+ if (typeof user_id !== 'string' || !user_id.trim()) {
408
+ return this.HighriseError.invalidUserId(user_id).toResult();
409
+ }
410
+
411
+ if (user_id === this.bot.info.user?.id) {
412
+ return new this.HighriseError(
413
+ ErrorConstants.PERMISSION.CANNOT_MODERATE_SELF,
414
+ 'Cannot moderate yourself',
415
+ { user_id }
416
+ ).toResult();
417
+ }
418
+
419
+ const payload = {
420
+ _type: 'ModerateRoomRequest',
421
+ user_id: user_id,
422
+ moderation_action: 'kick',
423
+ action_length: null
424
+ };
425
+
426
+ const response = await this.bot._fireAndForget.send(payload);
427
+
428
+ if (response.success) {
429
+ return this.HighriseResponse.success('kicked', {
430
+ user_id,
431
+ action: 'kick',
432
+ timestamp: Date.now()
433
+ });
434
+ }
435
+ } catch (error) {
436
+ return new this.HighriseError(
437
+ ErrorConstants.PERMISSION.INSUFFICIENT_PERMISSIONS,
438
+ `Failed to kick user: ${error.message}`,
439
+ { user_id }
440
+ ).toResult();
441
+ }
442
+ },
443
+
444
+ ban: async (user_id, duration = 3600000) => {
445
+ try {
446
+ if (typeof user_id !== 'string' || !user_id.trim()) {
447
+ return this.HighriseError.invalidUserId(user_id).toResult();
448
+ }
449
+
450
+ if (user_id === this.bot.info.user?.id) {
451
+ return new this.HighriseError(
452
+ ErrorConstants.PERMISSION.CANNOT_MODERATE_SELF,
453
+ 'Cannot moderate yourself',
454
+ { user_id }
455
+ ).toResult();
456
+ }
457
+
458
+ const maxDuration = 69 * 365.2425 * 24 * 60 * 60 * 1000;
459
+ if (typeof duration !== 'number' || duration < 0 || duration > maxDuration) {
460
+ return new this.HighriseError(
461
+ ErrorConstants.VALIDATION.INVALID_PARAMETER,
462
+ `Duration must be between 0 and ${maxDuration}ms`,
463
+ { duration, max: maxDuration }
464
+ ).toResult();
465
+ }
466
+
467
+ const payload = {
468
+ _type: 'ModerateRoomRequest',
469
+ user_id: user_id,
470
+ moderation_action: 'ban',
471
+ action_length: duration
472
+ };
473
+
474
+ const response = await this.bot._fireAndForget.send(payload);
475
+
476
+ if (response.success) {
477
+ return this.HighriseResponse.success('banned', {
478
+ user_id, duration,
479
+ action: 'ban',
480
+ timestamp: Date.now()
481
+ });
482
+ }
483
+ } catch (error) {
484
+ return new this.HighriseError(
485
+ ErrorConstants.PERMISSION.INSUFFICIENT_PERMISSIONS,
486
+ `Failed to ban user: ${error.message}`,
487
+ { user_id, duration }
488
+ ).toResult();
489
+ }
490
+ },
491
+
492
+ mute: async (user_id, duration = 300000) => {
493
+ try {
494
+ if (typeof user_id !== 'string' || !user_id.trim()) {
495
+ return this.HighriseError.invalidUserId(user_id).toResult();
496
+ }
497
+
498
+ if (user_id === this.bot.info.user?.id) {
499
+ return new this.HighriseError(
500
+ ErrorConstants.PERMISSION.CANNOT_MODERATE_SELF,
501
+ 'Cannot moderate yourself',
502
+ { user_id }
503
+ ).toResult();
504
+ }
505
+
506
+ const maxDuration = 69 * 365.2425 * 24 * 60 * 60 * 1000;
507
+ if (typeof duration !== 'number' || duration < 0 || duration > maxDuration) {
508
+ return new this.HighriseError(
509
+ ErrorConstants.VALIDATION.INVALID_PARAMETER,
510
+ `Duration must be between 0 and ${maxDuration}ms`,
511
+ { duration, max: maxDuration }
512
+ ).toResult();
513
+ }
514
+
515
+ const payload = {
516
+ _type: 'ModerateRoomRequest',
517
+ user_id: user_id,
518
+ moderation_action: 'mute',
519
+ action_length: duration
520
+ };
521
+
522
+ const response = await this.bot._fireAndForget.send(payload);
523
+
524
+ if (response.success) {
525
+ return this.HighriseResponse.success('muted', {
526
+ user_id, duration,
527
+ action: 'mute',
528
+ timestamp: Date.now()
529
+ });
530
+ }
531
+ } catch (error) {
532
+ return new this.HighriseError(
533
+ ErrorConstants.PERMISSION.INSUFFICIENT_PERMISSIONS,
534
+ `Failed to mute user: ${error.message}`,
535
+ { user_id, duration }
536
+ ).toResult();
537
+ }
538
+ },
539
+
540
+ unmute: async (user_id) => {
541
+ try {
542
+ if (typeof user_id !== 'string' || !user_id.trim()) {
543
+ return this.HighriseError.invalidUserId(user_id).toResult();
544
+ }
545
+
546
+ const payload = {
547
+ _type: 'ModerateRoomRequest',
548
+ user_id: user_id,
549
+ moderation_action: 'mute',
550
+ action_length: 1
551
+ };
552
+
553
+ const response = await this.bot._fireAndForget.send(payload);
554
+
555
+ if (response.success) {
556
+ return this.HighriseResponse.success('unmuted', {
557
+ user_id,
558
+ action: 'unmute',
559
+ timestamp: Date.now()
560
+ });
561
+ }
562
+ } catch (error) {
563
+ return new this.HighriseError(
564
+ ErrorConstants.PERMISSION.INSUFFICIENT_PERMISSIONS,
565
+ `Failed to unmute user: ${error.message}`,
566
+ { user_id }
567
+ ).toResult();
568
+ }
569
+ },
570
+
571
+ unban: async (user_id) => {
572
+ try {
573
+ if (typeof user_id !== 'string' || !user_id.trim()) {
574
+ return this.HighriseError.invalidUserId(user_id).toResult();
575
+ }
576
+
577
+ const payload = {
578
+ _type: 'ModerateRoomRequest',
579
+ user_id: user_id,
580
+ moderation_action: 'unban',
581
+ action_length: null
582
+ };
583
+
584
+ const response = await this.bot._fireAndForget.send(payload);
585
+
586
+ if (response.success) {
587
+ return this.HighriseResponse.success('unbanned', {
588
+ user_id,
589
+ action: 'unban',
590
+ timestamp: Date.now()
591
+ });
592
+ }
593
+ } catch (error) {
594
+ return new this.HighriseError(
595
+ ErrorConstants.PERMISSION.INSUFFICIENT_PERMISSIONS,
596
+ `Failed to unban user: ${error.message}`,
597
+ { user_id }
598
+ ).toResult();
599
+ }
600
+ }
601
+ }
602
+ }
603
+
604
+ module.exports = { PlayerClass };