moons-ta-client 1.0.2 → 1.0.3

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 (43) hide show
  1. package/dist/client.d.ts +22 -0
  2. package/dist/client.js +77 -0
  3. package/dist/constants.d.ts +4 -0
  4. package/{src/constants.ts → dist/constants.js} +1 -1
  5. package/dist/custom-event-emitter.d.ts +7 -0
  6. package/dist/custom-event-emitter.js +16 -0
  7. package/dist/index.d.ts +4591 -0
  8. package/dist/index.esm.js +16500 -0
  9. package/{src/index.ts → dist/index.js} +1 -1
  10. package/dist/models/commands.d.ts +116 -0
  11. package/{src/models/commands.ts → dist/models/commands.js} +17 -102
  12. package/dist/models/discord.d.ts +76 -0
  13. package/{src/models/discord.ts → dist/models/discord.js} +15 -62
  14. package/dist/models/events.d.ts +419 -0
  15. package/{src/models/events.ts → dist/models/events.js} +89 -354
  16. package/dist/models/index.js +8 -0
  17. package/dist/models/models.d.ts +1137 -0
  18. package/{src/models/models.ts → dist/models/models.js} +200 -799
  19. package/dist/models/packets.d.ts +144 -0
  20. package/{src/models/packets.ts → dist/models/packets.js} +26 -126
  21. package/dist/models/pushes.d.ts +122 -0
  22. package/{src/models/pushes.ts → dist/models/pushes.js} +24 -96
  23. package/dist/models/requests.d.ts +1694 -0
  24. package/{src/models/requests.ts → dist/models/requests.js} +323 -1469
  25. package/dist/models/responses.d.ts +799 -0
  26. package/{src/models/responses.ts → dist/models/responses.js} +161 -669
  27. package/dist/scraper.d.ts +2 -0
  28. package/dist/scraper.js +87 -0
  29. package/dist/state-manager.d.ts +50 -0
  30. package/dist/state-manager.js +196 -0
  31. package/dist/tournament-assistant-client.d.ts +113 -0
  32. package/dist/tournament-assistant-client.js +1167 -0
  33. package/package.json +8 -2
  34. package/rollup.config.mjs +0 -16
  35. package/scripts/esbuild.mjs +0 -24
  36. package/scripts/fixImports.mjs +0 -44
  37. package/src/client.ts +0 -101
  38. package/src/custom-event-emitter.ts +0 -21
  39. package/src/scraper.ts +0 -137
  40. package/src/state-manager.ts +0 -308
  41. package/src/tournament-assistant-client.ts +0 -1553
  42. package/tsconfig.json +0 -27
  43. /package/{src/models/index.ts → dist/models/index.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
1
  export * from "./tournament-assistant-client.js";
2
2
  export * from "./custom-event-emitter.js";
3
3
  export * from "./models/index.js";
4
- export * from "./constants.js";
4
+ export * from "./constants.js";
@@ -0,0 +1,116 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ import { Channel } from './discord.js';
8
+ import { GameplayParameters } from './models.js';
9
+ /**
10
+ * ---- Commands (DO something!) ---- //
11
+ *
12
+ * @generated from protobuf message proto.packets.Command
13
+ */
14
+ export interface Command {
15
+ /**
16
+ * @generated from protobuf oneof: type
17
+ */
18
+ type: {
19
+ oneofKind: "heartbeat";
20
+ /**
21
+ * @generated from protobuf field: bool heartbeat = 1;
22
+ */
23
+ heartbeat: boolean;
24
+ } | {
25
+ oneofKind: "returnToMenu";
26
+ /**
27
+ * @generated from protobuf field: bool return_to_menu = 2;
28
+ */
29
+ returnToMenu: boolean;
30
+ } | {
31
+ oneofKind: "delayTestFinish";
32
+ /**
33
+ * @generated from protobuf field: bool delay_test_finish = 3;
34
+ */
35
+ delayTestFinish: boolean;
36
+ } | {
37
+ oneofKind: "streamSyncShowImage";
38
+ /**
39
+ * @generated from protobuf field: bool stream_sync_show_image = 4;
40
+ */
41
+ streamSyncShowImage: boolean;
42
+ } | {
43
+ oneofKind: "playSong";
44
+ /**
45
+ * @generated from protobuf field: proto.packets.Command.PlaySong play_song = 6;
46
+ */
47
+ playSong: Command_PlaySong;
48
+ } | {
49
+ oneofKind: "sendBotMessage";
50
+ /**
51
+ * @generated from protobuf field: proto.packets.Command.SendBotMessage send_bot_message = 7;
52
+ */
53
+ sendBotMessage: Command_SendBotMessage;
54
+ } | {
55
+ oneofKind: "discordAuthorize";
56
+ /**
57
+ * @generated from protobuf field: string discord_authorize = 9;
58
+ */
59
+ discordAuthorize: string;
60
+ } | {
61
+ oneofKind: undefined;
62
+ };
63
+ }
64
+ /**
65
+ * @generated from protobuf message proto.packets.Command.PlaySong
66
+ */
67
+ export interface Command_PlaySong {
68
+ /**
69
+ * @generated from protobuf field: proto.models.GameplayParameters gameplay_parameters = 1;
70
+ */
71
+ gameplayParameters?: GameplayParameters;
72
+ }
73
+ /**
74
+ * @generated from protobuf message proto.packets.Command.SendBotMessage
75
+ */
76
+ export interface Command_SendBotMessage {
77
+ /**
78
+ * @generated from protobuf field: proto.discord.Channel channel = 1;
79
+ */
80
+ channel?: Channel;
81
+ /**
82
+ * @generated from protobuf field: string message = 2;
83
+ */
84
+ message: string;
85
+ }
86
+ declare class Command$Type extends MessageType<Command> {
87
+ constructor();
88
+ create(value?: PartialMessage<Command>): Command;
89
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command): Command;
90
+ internalBinaryWrite(message: Command, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
91
+ }
92
+ /**
93
+ * @generated MessageType for protobuf message proto.packets.Command
94
+ */
95
+ export declare const Command: Command$Type;
96
+ declare class Command_PlaySong$Type extends MessageType<Command_PlaySong> {
97
+ constructor();
98
+ create(value?: PartialMessage<Command_PlaySong>): Command_PlaySong;
99
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command_PlaySong): Command_PlaySong;
100
+ internalBinaryWrite(message: Command_PlaySong, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
101
+ }
102
+ /**
103
+ * @generated MessageType for protobuf message proto.packets.Command.PlaySong
104
+ */
105
+ export declare const Command_PlaySong: Command_PlaySong$Type;
106
+ declare class Command_SendBotMessage$Type extends MessageType<Command_SendBotMessage> {
107
+ constructor();
108
+ create(value?: PartialMessage<Command_SendBotMessage>): Command_SendBotMessage;
109
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command_SendBotMessage): Command_SendBotMessage;
110
+ internalBinaryWrite(message: Command_SendBotMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
111
+ }
112
+ /**
113
+ * @generated MessageType for protobuf message proto.packets.Command.SendBotMessage
114
+ */
115
+ export declare const Command_SendBotMessage: Command_SendBotMessage$Type;
116
+ export {};
@@ -1,97 +1,12 @@
1
- // @generated by protobuf-ts 2.8.2
2
- // @generated from protobuf file "commands.proto" (package "proto.packets", syntax proto3)
3
- // tslint:disable
4
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
1
  import { WireType } from "@protobuf-ts/runtime";
7
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
- import type { IBinaryReader } from "@protobuf-ts/runtime";
9
2
  import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
- import type { PartialMessage } from "@protobuf-ts/runtime";
11
3
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
4
  import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
13
5
  import { MessageType } from "@protobuf-ts/runtime";
14
6
  import { Channel } from './discord.js';
15
7
  import { GameplayParameters } from './models.js';
16
- /**
17
- * ---- Commands (DO something!) ---- //
18
- *
19
- * @generated from protobuf message proto.packets.Command
20
- */
21
- export interface Command {
22
- /**
23
- * @generated from protobuf oneof: type
24
- */
25
- type: {
26
- oneofKind: "heartbeat";
27
- /**
28
- * @generated from protobuf field: bool heartbeat = 1;
29
- */
30
- heartbeat: boolean; // Is this really a command?
31
- } | {
32
- oneofKind: "returnToMenu";
33
- /**
34
- * @generated from protobuf field: bool return_to_menu = 2;
35
- */
36
- returnToMenu: boolean;
37
- } | {
38
- oneofKind: "delayTestFinish";
39
- /**
40
- * @generated from protobuf field: bool delay_test_finish = 3;
41
- */
42
- delayTestFinish: boolean;
43
- } | {
44
- oneofKind: "streamSyncShowImage";
45
- /**
46
- * @generated from protobuf field: bool stream_sync_show_image = 4;
47
- */
48
- streamSyncShowImage: boolean;
49
- } | {
50
- oneofKind: "playSong";
51
- /**
52
- * @generated from protobuf field: proto.packets.Command.PlaySong play_song = 6;
53
- */
54
- playSong: Command_PlaySong;
55
- } | {
56
- oneofKind: "sendBotMessage";
57
- /**
58
- * @generated from protobuf field: proto.packets.Command.SendBotMessage send_bot_message = 7;
59
- */
60
- sendBotMessage: Command_SendBotMessage;
61
- } | {
62
- oneofKind: "discordAuthorize";
63
- /**
64
- * @generated from protobuf field: string discord_authorize = 9;
65
- */
66
- discordAuthorize: string;
67
- } | {
68
- oneofKind: undefined;
69
- };
70
- }
71
- /**
72
- * @generated from protobuf message proto.packets.Command.PlaySong
73
- */
74
- export interface Command_PlaySong {
75
- /**
76
- * @generated from protobuf field: proto.models.GameplayParameters gameplay_parameters = 1;
77
- */
78
- gameplayParameters?: GameplayParameters;
79
- }
80
- /**
81
- * @generated from protobuf message proto.packets.Command.SendBotMessage
82
- */
83
- export interface Command_SendBotMessage {
84
- /**
85
- * @generated from protobuf field: proto.discord.Channel channel = 1;
86
- */
87
- channel?: Channel;
88
- /**
89
- * @generated from protobuf field: string message = 2;
90
- */
91
- message: string;
92
- }
93
8
  // @generated message type with reflection information, may provide speed optimized methods
94
- class Command$Type extends MessageType<Command> {
9
+ class Command$Type extends MessageType {
95
10
  constructor() {
96
11
  super("proto.packets.Command", [
97
12
  { no: 1, name: "heartbeat", kind: "scalar", oneof: "type", T: 8 /*ScalarType.BOOL*/ },
@@ -103,14 +18,14 @@ class Command$Type extends MessageType<Command> {
103
18
  { no: 9, name: "discord_authorize", kind: "scalar", oneof: "type", T: 9 /*ScalarType.STRING*/ }
104
19
  ]);
105
20
  }
106
- create(value?: PartialMessage<Command>): Command {
21
+ create(value) {
107
22
  const message = { type: { oneofKind: undefined } };
108
23
  globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
109
24
  if (value !== undefined)
110
- reflectionMergePartial<Command>(this, message, value);
25
+ reflectionMergePartial(this, message, value);
111
26
  return message;
112
27
  }
113
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command): Command {
28
+ internalBinaryRead(reader, length, options, target) {
114
29
  let message = target ?? this.create(), end = reader.pos + length;
115
30
  while (reader.pos < end) {
116
31
  let [fieldNo, wireType] = reader.tag();
@@ -142,13 +57,13 @@ class Command$Type extends MessageType<Command> {
142
57
  case /* proto.packets.Command.PlaySong play_song */ 6:
143
58
  message.type = {
144
59
  oneofKind: "playSong",
145
- playSong: Command_PlaySong.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).playSong)
60
+ playSong: Command_PlaySong.internalBinaryRead(reader, reader.uint32(), options, message.type.playSong)
146
61
  };
147
62
  break;
148
63
  case /* proto.packets.Command.SendBotMessage send_bot_message */ 7:
149
64
  message.type = {
150
65
  oneofKind: "sendBotMessage",
151
- sendBotMessage: Command_SendBotMessage.internalBinaryRead(reader, reader.uint32(), options, (message.type as any).sendBotMessage)
66
+ sendBotMessage: Command_SendBotMessage.internalBinaryRead(reader, reader.uint32(), options, message.type.sendBotMessage)
152
67
  };
153
68
  break;
154
69
  case /* string discord_authorize */ 9:
@@ -168,7 +83,7 @@ class Command$Type extends MessageType<Command> {
168
83
  }
169
84
  return message;
170
85
  }
171
- internalBinaryWrite(message: Command, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
86
+ internalBinaryWrite(message, writer, options) {
172
87
  /* bool heartbeat = 1; */
173
88
  if (message.type.oneofKind === "heartbeat")
174
89
  writer.tag(1, WireType.Varint).bool(message.type.heartbeat);
@@ -201,20 +116,20 @@ class Command$Type extends MessageType<Command> {
201
116
  */
202
117
  export const Command = new Command$Type();
203
118
  // @generated message type with reflection information, may provide speed optimized methods
204
- class Command_PlaySong$Type extends MessageType<Command_PlaySong> {
119
+ class Command_PlaySong$Type extends MessageType {
205
120
  constructor() {
206
121
  super("proto.packets.Command.PlaySong", [
207
122
  { no: 1, name: "gameplay_parameters", kind: "message", T: () => GameplayParameters }
208
123
  ]);
209
124
  }
210
- create(value?: PartialMessage<Command_PlaySong>): Command_PlaySong {
125
+ create(value) {
211
126
  const message = {};
212
127
  globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
213
128
  if (value !== undefined)
214
- reflectionMergePartial<Command_PlaySong>(this, message, value);
129
+ reflectionMergePartial(this, message, value);
215
130
  return message;
216
131
  }
217
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command_PlaySong): Command_PlaySong {
132
+ internalBinaryRead(reader, length, options, target) {
218
133
  let message = target ?? this.create(), end = reader.pos + length;
219
134
  while (reader.pos < end) {
220
135
  let [fieldNo, wireType] = reader.tag();
@@ -233,7 +148,7 @@ class Command_PlaySong$Type extends MessageType<Command_PlaySong> {
233
148
  }
234
149
  return message;
235
150
  }
236
- internalBinaryWrite(message: Command_PlaySong, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
151
+ internalBinaryWrite(message, writer, options) {
237
152
  /* proto.models.GameplayParameters gameplay_parameters = 1; */
238
153
  if (message.gameplayParameters)
239
154
  GameplayParameters.internalBinaryWrite(message.gameplayParameters, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
@@ -248,21 +163,21 @@ class Command_PlaySong$Type extends MessageType<Command_PlaySong> {
248
163
  */
249
164
  export const Command_PlaySong = new Command_PlaySong$Type();
250
165
  // @generated message type with reflection information, may provide speed optimized methods
251
- class Command_SendBotMessage$Type extends MessageType<Command_SendBotMessage> {
166
+ class Command_SendBotMessage$Type extends MessageType {
252
167
  constructor() {
253
168
  super("proto.packets.Command.SendBotMessage", [
254
169
  { no: 1, name: "channel", kind: "message", T: () => Channel },
255
170
  { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
256
171
  ]);
257
172
  }
258
- create(value?: PartialMessage<Command_SendBotMessage>): Command_SendBotMessage {
173
+ create(value) {
259
174
  const message = { message: "" };
260
175
  globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
261
176
  if (value !== undefined)
262
- reflectionMergePartial<Command_SendBotMessage>(this, message, value);
177
+ reflectionMergePartial(this, message, value);
263
178
  return message;
264
179
  }
265
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command_SendBotMessage): Command_SendBotMessage {
180
+ internalBinaryRead(reader, length, options, target) {
266
181
  let message = target ?? this.create(), end = reader.pos + length;
267
182
  while (reader.pos < end) {
268
183
  let [fieldNo, wireType] = reader.tag();
@@ -284,7 +199,7 @@ class Command_SendBotMessage$Type extends MessageType<Command_SendBotMessage> {
284
199
  }
285
200
  return message;
286
201
  }
287
- internalBinaryWrite(message: Command_SendBotMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
202
+ internalBinaryWrite(message, writer, options) {
288
203
  /* proto.discord.Channel channel = 1; */
289
204
  if (message.channel)
290
205
  Channel.internalBinaryWrite(message.channel, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
@@ -0,0 +1,76 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ /**
8
+ * @generated from protobuf message proto.discord.Channel
9
+ */
10
+ export interface Channel {
11
+ /**
12
+ * @generated from protobuf field: string id = 1;
13
+ */
14
+ id: string;
15
+ /**
16
+ * @generated from protobuf field: string name = 2;
17
+ */
18
+ name: string;
19
+ }
20
+ /**
21
+ * @generated from protobuf message proto.discord.DiscordUser
22
+ */
23
+ export interface DiscordUser {
24
+ /**
25
+ * @generated from protobuf field: string id = 1;
26
+ */
27
+ id: string;
28
+ /**
29
+ * @generated from protobuf field: string name = 2;
30
+ */
31
+ name: string;
32
+ }
33
+ /**
34
+ * @generated from protobuf message proto.discord.Guild
35
+ */
36
+ export interface Guild {
37
+ /**
38
+ * @generated from protobuf field: string id = 1;
39
+ */
40
+ id: string;
41
+ /**
42
+ * @generated from protobuf field: string name = 2;
43
+ */
44
+ name: string;
45
+ }
46
+ declare class Channel$Type extends MessageType<Channel> {
47
+ constructor();
48
+ create(value?: PartialMessage<Channel>): Channel;
49
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Channel): Channel;
50
+ internalBinaryWrite(message: Channel, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
51
+ }
52
+ /**
53
+ * @generated MessageType for protobuf message proto.discord.Channel
54
+ */
55
+ export declare const Channel: Channel$Type;
56
+ declare class DiscordUser$Type extends MessageType<DiscordUser> {
57
+ constructor();
58
+ create(value?: PartialMessage<DiscordUser>): DiscordUser;
59
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DiscordUser): DiscordUser;
60
+ internalBinaryWrite(message: DiscordUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
61
+ }
62
+ /**
63
+ * @generated MessageType for protobuf message proto.discord.DiscordUser
64
+ */
65
+ export declare const DiscordUser: DiscordUser$Type;
66
+ declare class Guild$Type extends MessageType<Guild> {
67
+ constructor();
68
+ create(value?: PartialMessage<Guild>): Guild;
69
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Guild): Guild;
70
+ internalBinaryWrite(message: Guild, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
71
+ }
72
+ /**
73
+ * @generated MessageType for protobuf message proto.discord.Guild
74
+ */
75
+ export declare const Guild: Guild$Type;
76
+ export {};
@@ -1,71 +1,24 @@
1
- // @generated by protobuf-ts 2.8.2
2
- // @generated from protobuf file "discord.proto" (package "proto.discord", syntax proto3)
3
- // tslint:disable
4
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
1
  import { WireType } from "@protobuf-ts/runtime";
7
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
- import type { IBinaryReader } from "@protobuf-ts/runtime";
9
2
  import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
- import type { PartialMessage } from "@protobuf-ts/runtime";
11
3
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
4
  import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
13
5
  import { MessageType } from "@protobuf-ts/runtime";
14
- /**
15
- * @generated from protobuf message proto.discord.Channel
16
- */
17
- export interface Channel {
18
- /**
19
- * @generated from protobuf field: string id = 1;
20
- */
21
- id: string;
22
- /**
23
- * @generated from protobuf field: string name = 2;
24
- */
25
- name: string;
26
- }
27
- /**
28
- * @generated from protobuf message proto.discord.DiscordUser
29
- */
30
- export interface DiscordUser {
31
- /**
32
- * @generated from protobuf field: string id = 1;
33
- */
34
- id: string;
35
- /**
36
- * @generated from protobuf field: string name = 2;
37
- */
38
- name: string;
39
- }
40
- /**
41
- * @generated from protobuf message proto.discord.Guild
42
- */
43
- export interface Guild {
44
- /**
45
- * @generated from protobuf field: string id = 1;
46
- */
47
- id: string;
48
- /**
49
- * @generated from protobuf field: string name = 2;
50
- */
51
- name: string;
52
- }
53
6
  // @generated message type with reflection information, may provide speed optimized methods
54
- class Channel$Type extends MessageType<Channel> {
7
+ class Channel$Type extends MessageType {
55
8
  constructor() {
56
9
  super("proto.discord.Channel", [
57
10
  { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
58
11
  { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
59
12
  ]);
60
13
  }
61
- create(value?: PartialMessage<Channel>): Channel {
14
+ create(value) {
62
15
  const message = { id: "", name: "" };
63
16
  globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
64
17
  if (value !== undefined)
65
- reflectionMergePartial<Channel>(this, message, value);
18
+ reflectionMergePartial(this, message, value);
66
19
  return message;
67
20
  }
68
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Channel): Channel {
21
+ internalBinaryRead(reader, length, options, target) {
69
22
  let message = target ?? this.create(), end = reader.pos + length;
70
23
  while (reader.pos < end) {
71
24
  let [fieldNo, wireType] = reader.tag();
@@ -87,7 +40,7 @@ class Channel$Type extends MessageType<Channel> {
87
40
  }
88
41
  return message;
89
42
  }
90
- internalBinaryWrite(message: Channel, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
43
+ internalBinaryWrite(message, writer, options) {
91
44
  /* string id = 1; */
92
45
  if (message.id !== "")
93
46
  writer.tag(1, WireType.LengthDelimited).string(message.id);
@@ -105,21 +58,21 @@ class Channel$Type extends MessageType<Channel> {
105
58
  */
106
59
  export const Channel = new Channel$Type();
107
60
  // @generated message type with reflection information, may provide speed optimized methods
108
- class DiscordUser$Type extends MessageType<DiscordUser> {
61
+ class DiscordUser$Type extends MessageType {
109
62
  constructor() {
110
63
  super("proto.discord.DiscordUser", [
111
64
  { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
112
65
  { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
113
66
  ]);
114
67
  }
115
- create(value?: PartialMessage<DiscordUser>): DiscordUser {
68
+ create(value) {
116
69
  const message = { id: "", name: "" };
117
70
  globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
118
71
  if (value !== undefined)
119
- reflectionMergePartial<DiscordUser>(this, message, value);
72
+ reflectionMergePartial(this, message, value);
120
73
  return message;
121
74
  }
122
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DiscordUser): DiscordUser {
75
+ internalBinaryRead(reader, length, options, target) {
123
76
  let message = target ?? this.create(), end = reader.pos + length;
124
77
  while (reader.pos < end) {
125
78
  let [fieldNo, wireType] = reader.tag();
@@ -141,7 +94,7 @@ class DiscordUser$Type extends MessageType<DiscordUser> {
141
94
  }
142
95
  return message;
143
96
  }
144
- internalBinaryWrite(message: DiscordUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
97
+ internalBinaryWrite(message, writer, options) {
145
98
  /* string id = 1; */
146
99
  if (message.id !== "")
147
100
  writer.tag(1, WireType.LengthDelimited).string(message.id);
@@ -159,21 +112,21 @@ class DiscordUser$Type extends MessageType<DiscordUser> {
159
112
  */
160
113
  export const DiscordUser = new DiscordUser$Type();
161
114
  // @generated message type with reflection information, may provide speed optimized methods
162
- class Guild$Type extends MessageType<Guild> {
115
+ class Guild$Type extends MessageType {
163
116
  constructor() {
164
117
  super("proto.discord.Guild", [
165
118
  { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
166
119
  { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
167
120
  ]);
168
121
  }
169
- create(value?: PartialMessage<Guild>): Guild {
122
+ create(value) {
170
123
  const message = { id: "", name: "" };
171
124
  globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
172
125
  if (value !== undefined)
173
- reflectionMergePartial<Guild>(this, message, value);
126
+ reflectionMergePartial(this, message, value);
174
127
  return message;
175
128
  }
176
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Guild): Guild {
129
+ internalBinaryRead(reader, length, options, target) {
177
130
  let message = target ?? this.create(), end = reader.pos + length;
178
131
  while (reader.pos < end) {
179
132
  let [fieldNo, wireType] = reader.tag();
@@ -195,7 +148,7 @@ class Guild$Type extends MessageType<Guild> {
195
148
  }
196
149
  return message;
197
150
  }
198
- internalBinaryWrite(message: Guild, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
151
+ internalBinaryWrite(message, writer, options) {
199
152
  /* string id = 1; */
200
153
  if (message.id !== "")
201
154
  writer.tag(1, WireType.LengthDelimited).string(message.id);