@frogbotai/piece-discord 0.27.0 → 0.29.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/dist/index.d.ts CHANGED
@@ -55,791 +55,589 @@ export declare const createDiscord: import("frogbot").PieceFactory<{
55
55
  }>;
56
56
  }>;
57
57
  };
58
- readonly actions: readonly [{
59
- slug: string;
60
- description: string;
61
- input: z.ZodObject<{
62
- channelId: z.ZodString;
63
- message: z.ZodOptional<z.ZodString>;
64
- attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
65
- fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
66
- name: z.ZodOptional<z.ZodString>;
67
- }, z.core.$strip>>>;
68
- }, z.core.$strip>;
69
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
70
- idempotent: false;
71
- options: {
72
- channelId: typeof import("./options.js").channelOptions;
73
- };
74
- run({ client, input, req }: {
75
- input: {
76
- channelId: string;
77
- attachments: {
78
- fileId: string | number;
79
- name?: string | undefined;
80
- }[];
81
- message?: string | undefined;
82
- };
83
- client: {
84
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
85
- status: number;
86
- headers: {
87
- [k: string]: string;
88
- };
89
- body: unknown;
90
- }>;
91
- };
92
- options: object;
93
- req: import("frogbot").FrogBotRequest;
94
- }): Promise<Record<string, unknown>>;
58
+ readonly actions: readonly [import("frogbot").PieceActionDefinition<z.ZodObject<{
59
+ channelId: z.ZodString;
60
+ message: z.ZodOptional<z.ZodString>;
61
+ attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
62
+ fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
63
+ name: z.ZodOptional<z.ZodString>;
64
+ }, z.core.$strip>>>;
65
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, {
66
+ mentionRoleIds: string[];
67
+ respondToChannelIds: string[];
68
+ respondToGlobalMentions: boolean;
69
+ apiUrl?: string | undefined;
70
+ applicationId?: string | undefined;
71
+ publicKey?: string | undefined;
72
+ botUsername?: string | undefined;
95
73
  }, {
96
- slug: string;
97
- description: string;
98
- input: z.ZodObject<{
99
- webhookUrl: z.ZodURL;
100
- username: z.ZodOptional<z.ZodString>;
101
- content: z.ZodString;
102
- avatarUrl: z.ZodOptional<z.ZodURL>;
103
- embeds: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
104
- tts: z.ZodDefault<z.ZodBoolean>;
105
- }, z.core.$strip>;
106
- output: z.ZodObject<{
107
- success: z.ZodBoolean;
108
- }, z.core.$strip>;
109
- idempotent: false;
110
- run({ client, input }: {
111
- input: {
112
- webhookUrl: string;
113
- content: string;
114
- embeds: Record<string, unknown>[];
115
- tts: boolean;
116
- username?: string | undefined;
117
- avatarUrl?: string | undefined;
118
- };
119
- client: {
120
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
121
- status: number;
122
- headers: {
123
- [k: string]: string;
124
- };
125
- body: unknown;
126
- }>;
74
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
75
+ status: number;
76
+ headers: {
77
+ [k: string]: string;
127
78
  };
128
- options: object;
129
- req: import("frogbot").FrogBotRequest;
130
- }): Promise<{
131
- success: true;
79
+ body: unknown;
132
80
  }>;
81
+ }, Record<string, unknown>> & {
82
+ slug: "sendMessage";
83
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
84
+ webhookUrl: z.ZodURL;
85
+ username: z.ZodOptional<z.ZodString>;
86
+ content: z.ZodString;
87
+ avatarUrl: z.ZodOptional<z.ZodURL>;
88
+ embeds: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
89
+ tts: z.ZodDefault<z.ZodBoolean>;
90
+ }, z.core.$strip>, z.ZodObject<{
91
+ success: z.ZodBoolean;
92
+ }, z.core.$strip>, {
93
+ mentionRoleIds: string[];
94
+ respondToChannelIds: string[];
95
+ respondToGlobalMentions: boolean;
96
+ apiUrl?: string | undefined;
97
+ applicationId?: string | undefined;
98
+ publicKey?: string | undefined;
99
+ botUsername?: string | undefined;
133
100
  }, {
134
- slug: string;
135
- description: string;
136
- input: z.ZodObject<{
137
- channelId: z.ZodString;
138
- message: z.ZodString;
139
- reviewUrl: z.ZodURL;
140
- buttonLabel: z.ZodDefault<z.ZodString>;
141
- }, z.core.$strip>;
142
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
143
- idempotent: false;
144
- options: {
145
- channelId: typeof import("./options.js").channelOptions;
146
- };
147
- run({ client, input }: {
148
- input: {
149
- channelId: string;
150
- message: string;
151
- reviewUrl: string;
152
- buttonLabel: string;
153
- };
154
- client: {
155
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
156
- status: number;
157
- headers: {
158
- [k: string]: string;
159
- };
160
- body: unknown;
161
- }>;
101
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
102
+ status: number;
103
+ headers: {
104
+ [k: string]: string;
162
105
  };
163
- options: object;
164
- req: import("frogbot").FrogBotRequest;
165
- }): Promise<Record<string, unknown>>;
166
- }, {
167
- slug: string;
168
- description: string;
169
- input: z.ZodObject<{
170
- guildId: z.ZodString;
171
- userId: z.ZodString;
172
- roleId: z.ZodString;
173
- }, z.core.$strip>;
174
- output: z.ZodObject<{
175
- success: z.ZodBoolean;
176
- }, z.core.$strip>;
177
- idempotent: boolean;
178
- options: Partial<{
179
- guildId: (args: {
180
- input: Partial<{
181
- guildId: string;
182
- userId: string;
183
- roleId: string;
184
- }>;
185
- client: {
186
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
187
- status: number;
188
- headers: {
189
- [k: string]: string;
190
- };
191
- body: unknown;
192
- }>;
193
- };
194
- options: object;
195
- req: import("frogbot").FrogBotRequest;
196
- }) => Promise<import("frogbot").PieceOption[]>;
197
- userId: (args: {
198
- input: Partial<{
199
- guildId: string;
200
- userId: string;
201
- roleId: string;
202
- }>;
203
- client: {
204
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
205
- status: number;
206
- headers: {
207
- [k: string]: string;
208
- };
209
- body: unknown;
210
- }>;
211
- };
212
- options: object;
213
- req: import("frogbot").FrogBotRequest;
214
- }) => Promise<import("frogbot").PieceOption[]>;
215
- roleId: (args: {
216
- input: Partial<{
217
- guildId: string;
218
- userId: string;
219
- roleId: string;
220
- }>;
221
- client: {
222
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
223
- status: number;
224
- headers: {
225
- [k: string]: string;
226
- };
227
- body: unknown;
228
- }>;
229
- };
230
- options: object;
231
- req: import("frogbot").FrogBotRequest;
232
- }) => Promise<import("frogbot").PieceOption[]>;
106
+ body: unknown;
233
107
  }>;
234
- run({ client, input: value }: {
235
- input: {
236
- guildId: string;
237
- userId: string;
238
- roleId: string;
239
- };
240
- client: {
241
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
242
- status: number;
243
- headers: {
244
- [k: string]: string;
245
- };
246
- body: unknown;
247
- }>;
108
+ }, {
109
+ success: boolean;
110
+ }> & {
111
+ slug: "sendWebhookMessage";
112
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
113
+ channelId: z.ZodString;
114
+ message: z.ZodString;
115
+ reviewUrl: z.ZodURL;
116
+ buttonLabel: z.ZodDefault<z.ZodString>;
117
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, {
118
+ mentionRoleIds: string[];
119
+ respondToChannelIds: string[];
120
+ respondToGlobalMentions: boolean;
121
+ apiUrl?: string | undefined;
122
+ applicationId?: string | undefined;
123
+ publicKey?: string | undefined;
124
+ botUsername?: string | undefined;
125
+ }, {
126
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
127
+ status: number;
128
+ headers: {
129
+ [k: string]: string;
248
130
  };
249
- options: object;
250
- req: import("frogbot").FrogBotRequest;
251
- }): Promise<{
252
- success: true;
131
+ body: unknown;
253
132
  }>;
133
+ }, Record<string, unknown>> & {
134
+ slug: "requestApproval";
135
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
136
+ guildId: z.ZodString;
137
+ userId: z.ZodString;
138
+ roleId: z.ZodString;
139
+ }, z.core.$strip>, z.ZodObject<{
140
+ success: z.ZodBoolean;
141
+ }, z.core.$strip>, {
142
+ mentionRoleIds: string[];
143
+ respondToChannelIds: string[];
144
+ respondToGlobalMentions: boolean;
145
+ apiUrl?: string | undefined;
146
+ applicationId?: string | undefined;
147
+ publicKey?: string | undefined;
148
+ botUsername?: string | undefined;
254
149
  }, {
255
- slug: string;
256
- description: string;
257
- input: z.ZodObject<{
258
- guildId: z.ZodString;
259
- userId: z.ZodString;
260
- roleId: z.ZodString;
261
- }, z.core.$strip>;
262
- output: z.ZodObject<{
263
- success: z.ZodBoolean;
264
- }, z.core.$strip>;
265
- idempotent: boolean;
266
- options: Partial<{
267
- guildId: (args: {
268
- input: Partial<{
269
- guildId: string;
270
- userId: string;
271
- roleId: string;
272
- }>;
273
- client: {
274
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
275
- status: number;
276
- headers: {
277
- [k: string]: string;
278
- };
279
- body: unknown;
280
- }>;
281
- };
282
- options: object;
283
- req: import("frogbot").FrogBotRequest;
284
- }) => Promise<import("frogbot").PieceOption[]>;
285
- userId: (args: {
286
- input: Partial<{
287
- guildId: string;
288
- userId: string;
289
- roleId: string;
290
- }>;
291
- client: {
292
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
293
- status: number;
294
- headers: {
295
- [k: string]: string;
296
- };
297
- body: unknown;
298
- }>;
299
- };
300
- options: object;
301
- req: import("frogbot").FrogBotRequest;
302
- }) => Promise<import("frogbot").PieceOption[]>;
303
- roleId: (args: {
304
- input: Partial<{
305
- guildId: string;
306
- userId: string;
307
- roleId: string;
308
- }>;
309
- client: {
310
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
311
- status: number;
312
- headers: {
313
- [k: string]: string;
314
- };
315
- body: unknown;
316
- }>;
317
- };
318
- options: object;
319
- req: import("frogbot").FrogBotRequest;
320
- }) => Promise<import("frogbot").PieceOption[]>;
321
- }>;
322
- run({ client, input: value }: {
323
- input: {
324
- guildId: string;
325
- userId: string;
326
- roleId: string;
327
- };
328
- client: {
329
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
330
- status: number;
331
- headers: {
332
- [k: string]: string;
333
- };
334
- body: unknown;
335
- }>;
150
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
151
+ status: number;
152
+ headers: {
153
+ [k: string]: string;
336
154
  };
337
- options: object;
338
- req: import("frogbot").FrogBotRequest;
339
- }): Promise<{
340
- success: true;
155
+ body: unknown;
341
156
  }>;
342
157
  }, {
343
- slug: string;
344
- description: string;
345
- input: z.ZodObject<{
346
- guildId: z.ZodString;
347
- userId: z.ZodString;
348
- }, z.core.$strip>;
349
- output: z.ZodObject<{
350
- success: z.ZodBoolean;
351
- }, z.core.$strip>;
352
- idempotent: boolean;
353
- options: Partial<{
354
- guildId: (args: {
355
- input: Partial<{
356
- guildId: string;
357
- userId: string;
358
- }>;
359
- client: {
360
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
361
- status: number;
362
- headers: {
363
- [k: string]: string;
364
- };
365
- body: unknown;
366
- }>;
367
- };
368
- options: object;
369
- req: import("frogbot").FrogBotRequest;
370
- }) => Promise<import("frogbot").PieceOption[]>;
371
- userId: (args: {
372
- input: Partial<{
373
- guildId: string;
374
- userId: string;
375
- }>;
376
- client: {
377
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
378
- status: number;
379
- headers: {
380
- [k: string]: string;
381
- };
382
- body: unknown;
383
- }>;
384
- };
385
- options: object;
386
- req: import("frogbot").FrogBotRequest;
387
- }) => Promise<import("frogbot").PieceOption[]>;
388
- }>;
389
- run({ client, input: value }: {
390
- input: {
391
- guildId: string;
392
- userId: string;
393
- };
394
- client: {
395
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
396
- status: number;
397
- headers: {
398
- [k: string]: string;
399
- };
400
- body: unknown;
401
- }>;
158
+ success: boolean;
159
+ }> & {
160
+ slug: "addRoleToMember";
161
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
162
+ guildId: z.ZodString;
163
+ userId: z.ZodString;
164
+ roleId: z.ZodString;
165
+ }, z.core.$strip>, z.ZodObject<{
166
+ success: z.ZodBoolean;
167
+ }, z.core.$strip>, {
168
+ mentionRoleIds: string[];
169
+ respondToChannelIds: string[];
170
+ respondToGlobalMentions: boolean;
171
+ apiUrl?: string | undefined;
172
+ applicationId?: string | undefined;
173
+ publicKey?: string | undefined;
174
+ botUsername?: string | undefined;
175
+ }, {
176
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
177
+ status: number;
178
+ headers: {
179
+ [k: string]: string;
402
180
  };
403
- options: object;
404
- req: import("frogbot").FrogBotRequest;
405
- }): Promise<{
406
- success: true;
181
+ body: unknown;
407
182
  }>;
408
183
  }, {
409
- slug: string;
410
- description: string;
411
- input: z.ZodObject<{
412
- guildId: z.ZodString;
413
- search: z.ZodString;
414
- limit: z.ZodDefault<z.ZodNumber>;
415
- }, z.core.$strip>;
416
- output: z.ZodArray<z.ZodObject<{
417
- label: z.ZodString;
418
- value: z.ZodString;
419
- }, z.core.$strip>>;
420
- idempotent: true;
421
- options: {
422
- guildId: typeof import("./options.js").guildOptions;
423
- };
424
- run({ client, input }: {
425
- input: {
426
- guildId: string;
427
- search: string;
428
- limit: number;
429
- };
430
- client: {
431
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
432
- status: number;
433
- headers: {
434
- [k: string]: string;
435
- };
436
- body: unknown;
437
- }>;
438
- };
439
- options: object;
440
- req: import("frogbot").FrogBotRequest;
441
- }): Promise<{
442
- label: string;
443
- value: string;
444
- }[]>;
184
+ success: boolean;
185
+ }> & {
186
+ slug: "removeRoleFromMember";
187
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
188
+ guildId: z.ZodString;
189
+ userId: z.ZodString;
190
+ }, z.core.$strip>, z.ZodObject<{
191
+ success: z.ZodBoolean;
192
+ }, z.core.$strip>, {
193
+ mentionRoleIds: string[];
194
+ respondToChannelIds: string[];
195
+ respondToGlobalMentions: boolean;
196
+ apiUrl?: string | undefined;
197
+ applicationId?: string | undefined;
198
+ publicKey?: string | undefined;
199
+ botUsername?: string | undefined;
445
200
  }, {
446
- slug: string;
447
- description: string;
448
- input: z.ZodObject<{
449
- channelId: z.ZodString;
450
- name: z.ZodString;
451
- }, z.core.$strip>;
452
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
453
- idempotent: true;
454
- options: {
455
- channelId: typeof import("./options.js").channelOptions;
456
- };
457
- run({ client, input }: {
458
- input: {
459
- channelId: string;
460
- name: string;
201
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
202
+ status: number;
203
+ headers: {
204
+ [k: string]: string;
461
205
  };
462
- client: {
463
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
464
- status: number;
465
- headers: {
466
- [k: string]: string;
467
- };
468
- body: unknown;
469
- }>;
206
+ body: unknown;
207
+ }>;
208
+ }, {
209
+ success: boolean;
210
+ }> & {
211
+ slug: "removeMember";
212
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
213
+ guildId: z.ZodString;
214
+ search: z.ZodString;
215
+ limit: z.ZodDefault<z.ZodNumber>;
216
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
217
+ label: z.ZodString;
218
+ value: z.ZodString;
219
+ }, z.core.$strip>>, {
220
+ mentionRoleIds: string[];
221
+ respondToChannelIds: string[];
222
+ respondToGlobalMentions: boolean;
223
+ apiUrl?: string | undefined;
224
+ applicationId?: string | undefined;
225
+ publicKey?: string | undefined;
226
+ botUsername?: string | undefined;
227
+ }, {
228
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
229
+ status: number;
230
+ headers: {
231
+ [k: string]: string;
470
232
  };
471
- options: object;
472
- req: import("frogbot").FrogBotRequest;
473
- }): Promise<Record<string, unknown>>;
233
+ body: unknown;
234
+ }>;
474
235
  }, {
475
- slug: string;
476
- description: string;
477
- input: z.ZodObject<{
478
- guildId: z.ZodString;
236
+ label: string;
237
+ value: string;
238
+ }[]> & {
239
+ slug: "listMembers";
240
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
241
+ channelId: z.ZodString;
242
+ name: z.ZodString;
243
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, {
244
+ mentionRoleIds: string[];
245
+ respondToChannelIds: string[];
246
+ respondToGlobalMentions: boolean;
247
+ apiUrl?: string | undefined;
248
+ applicationId?: string | undefined;
249
+ publicKey?: string | undefined;
250
+ botUsername?: string | undefined;
251
+ }, {
252
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
253
+ status: number;
254
+ headers: {
255
+ [k: string]: string;
256
+ };
257
+ body: unknown;
258
+ }>;
259
+ }, Record<string, unknown>> & {
260
+ slug: "renameChannel";
261
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
262
+ guildId: z.ZodString;
263
+ name: z.ZodString;
264
+ topic: z.ZodOptional<z.ZodString>;
265
+ }, z.core.$strip>, z.ZodObject<{
266
+ success: z.ZodBoolean;
267
+ channel: z.ZodObject<{
268
+ id: z.ZodString;
479
269
  name: z.ZodString;
480
- topic: z.ZodOptional<z.ZodString>;
481
- }, z.core.$strip>;
482
- output: z.ZodObject<{
483
- success: z.ZodBoolean;
484
- channel: z.ZodObject<{
485
- id: z.ZodString;
486
- name: z.ZodString;
487
- }, z.core.$strip>;
488
270
  }, z.core.$strip>;
489
- idempotent: false;
490
- options: {
491
- guildId: typeof import("./options.js").guildOptions;
492
- };
493
- run({ client, input }: {
494
- input: {
495
- guildId: string;
496
- name: string;
497
- topic?: string | undefined;
498
- };
499
- client: {
500
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
501
- status: number;
502
- headers: {
503
- [k: string]: string;
504
- };
505
- body: unknown;
506
- }>;
507
- };
508
- options: object;
509
- req: import("frogbot").FrogBotRequest;
510
- }): Promise<{
511
- success: true;
512
- channel: {
513
- id: string;
514
- name: string;
271
+ }, z.core.$strip>, {
272
+ mentionRoleIds: string[];
273
+ respondToChannelIds: string[];
274
+ respondToGlobalMentions: boolean;
275
+ apiUrl?: string | undefined;
276
+ applicationId?: string | undefined;
277
+ publicKey?: string | undefined;
278
+ botUsername?: string | undefined;
279
+ }, {
280
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
281
+ status: number;
282
+ headers: {
283
+ [k: string]: string;
515
284
  };
285
+ body: unknown;
516
286
  }>;
517
287
  }, {
518
- slug: string;
519
- description: string;
520
- input: z.ZodObject<{
521
- channelId: z.ZodString;
522
- }, z.core.$strip>;
523
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
524
- idempotent: true;
525
- options: {
526
- channelId: typeof import("./options.js").channelOptions;
288
+ success: boolean;
289
+ channel: {
290
+ id: string;
291
+ name: string;
527
292
  };
528
- run({ client, input }: {
529
- input: {
530
- channelId: string;
531
- };
532
- client: {
533
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
534
- status: number;
535
- headers: {
536
- [k: string]: string;
537
- };
538
- body: unknown;
539
- }>;
540
- };
541
- options: object;
542
- req: import("frogbot").FrogBotRequest;
543
- }): Promise<Record<string, unknown>>;
293
+ }> & {
294
+ slug: "createChannel";
295
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
296
+ channelId: z.ZodString;
297
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, {
298
+ mentionRoleIds: string[];
299
+ respondToChannelIds: string[];
300
+ respondToGlobalMentions: boolean;
301
+ apiUrl?: string | undefined;
302
+ applicationId?: string | undefined;
303
+ publicKey?: string | undefined;
304
+ botUsername?: string | undefined;
544
305
  }, {
545
- slug: string;
546
- description: string;
547
- input: z.ZodObject<{
548
- guildId: z.ZodString;
549
- name: z.ZodString;
550
- }, z.core.$strip>;
551
- output: z.ZodObject<{
552
- success: z.ZodBoolean;
553
- channelId: z.ZodOptional<z.ZodString>;
554
- }, z.core.$strip>;
555
- idempotent: true;
556
- options: {
557
- guildId: typeof import("./options.js").guildOptions;
558
- };
559
- run({ client, input }: {
560
- input: {
561
- guildId: string;
562
- name: string;
563
- };
564
- client: {
565
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
566
- status: number;
567
- headers: {
568
- [k: string]: string;
569
- };
570
- body: unknown;
571
- }>;
306
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
307
+ status: number;
308
+ headers: {
309
+ [k: string]: string;
572
310
  };
573
- options: object;
574
- req: import("frogbot").FrogBotRequest;
575
- }): Promise<{
576
- success: boolean;
577
- channelId: any;
311
+ body: unknown;
578
312
  }>;
313
+ }, Record<string, unknown>> & {
314
+ slug: "deleteChannel";
315
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
316
+ guildId: z.ZodString;
317
+ name: z.ZodString;
318
+ }, z.core.$strip>, z.ZodObject<{
319
+ success: z.ZodBoolean;
320
+ channelId: z.ZodOptional<z.ZodString>;
321
+ }, z.core.$strip>, {
322
+ mentionRoleIds: string[];
323
+ respondToChannelIds: string[];
324
+ respondToGlobalMentions: boolean;
325
+ apiUrl?: string | undefined;
326
+ applicationId?: string | undefined;
327
+ publicKey?: string | undefined;
328
+ botUsername?: string | undefined;
579
329
  }, {
580
- slug: string;
581
- description: string;
582
- input: z.ZodObject<{
583
- guildId: z.ZodString;
584
- userId: z.ZodString;
585
- reason: z.ZodOptional<z.ZodString>;
586
- }, z.core.$strip>;
587
- output: z.ZodObject<{
588
- success: z.ZodBoolean;
589
- }, z.core.$strip>;
590
- idempotent: true;
591
- options: {
592
- guildId: typeof import("./options.js").guildOptions;
593
- };
594
- run({ client, input }: {
595
- input: {
596
- guildId: string;
597
- userId: string;
598
- reason?: string | undefined;
330
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
331
+ status: number;
332
+ headers: {
333
+ [k: string]: string;
599
334
  };
600
- client: {
601
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
602
- status: number;
603
- headers: {
604
- [k: string]: string;
605
- };
606
- body: unknown;
607
- }>;
335
+ body: unknown;
336
+ }>;
337
+ }, {
338
+ success: boolean;
339
+ channelId?: string | undefined;
340
+ }> & {
341
+ slug: "findChannel";
342
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
343
+ guildId: z.ZodString;
344
+ userId: z.ZodString;
345
+ reason: z.ZodOptional<z.ZodString>;
346
+ }, z.core.$strip>, z.ZodObject<{
347
+ success: z.ZodBoolean;
348
+ }, z.core.$strip>, {
349
+ mentionRoleIds: string[];
350
+ respondToChannelIds: string[];
351
+ respondToGlobalMentions: boolean;
352
+ apiUrl?: string | undefined;
353
+ applicationId?: string | undefined;
354
+ publicKey?: string | undefined;
355
+ botUsername?: string | undefined;
356
+ }, {
357
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
358
+ status: number;
359
+ headers: {
360
+ [k: string]: string;
608
361
  };
609
- options: object;
610
- req: import("frogbot").FrogBotRequest;
611
- }): Promise<{
612
- success: true;
362
+ body: unknown;
613
363
  }>;
614
364
  }, {
615
- slug: string;
616
- description: string;
617
- input: z.ZodObject<{
618
- guildId: z.ZodString;
365
+ success: boolean;
366
+ }> & {
367
+ slug: "unbanMember";
368
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
369
+ guildId: z.ZodString;
370
+ name: z.ZodString;
371
+ color: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
372
+ displaySeparately: z.ZodOptional<z.ZodBoolean>;
373
+ mentionable: z.ZodOptional<z.ZodBoolean>;
374
+ reason: z.ZodOptional<z.ZodString>;
375
+ }, z.core.$strip>, z.ZodObject<{
376
+ success: z.ZodBoolean;
377
+ role: z.ZodObject<{
378
+ id: z.ZodString;
619
379
  name: z.ZodString;
620
- color: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
621
- displaySeparately: z.ZodOptional<z.ZodBoolean>;
622
- mentionable: z.ZodOptional<z.ZodBoolean>;
623
- reason: z.ZodOptional<z.ZodString>;
624
- }, z.core.$strip>;
625
- output: z.ZodObject<{
626
- success: z.ZodBoolean;
627
- role: z.ZodObject<{
628
- id: z.ZodString;
629
- name: z.ZodString;
630
- }, z.core.$strip>;
631
380
  }, z.core.$strip>;
632
- idempotent: false;
633
- options: {
634
- guildId: typeof import("./options.js").guildOptions;
635
- };
636
- run({ client, input }: {
637
- input: {
638
- guildId: string;
639
- name: string;
640
- color?: number | undefined;
641
- displaySeparately?: boolean | undefined;
642
- mentionable?: boolean | undefined;
643
- reason?: string | undefined;
644
- };
645
- client: {
646
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
647
- status: number;
648
- headers: {
649
- [k: string]: string;
650
- };
651
- body: unknown;
652
- }>;
653
- };
654
- options: object;
655
- req: import("frogbot").FrogBotRequest;
656
- }): Promise<{
657
- success: true;
658
- role: {
659
- id: string;
660
- name: string;
381
+ }, z.core.$strip>, {
382
+ mentionRoleIds: string[];
383
+ respondToChannelIds: string[];
384
+ respondToGlobalMentions: boolean;
385
+ apiUrl?: string | undefined;
386
+ applicationId?: string | undefined;
387
+ publicKey?: string | undefined;
388
+ botUsername?: string | undefined;
389
+ }, {
390
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
391
+ status: number;
392
+ headers: {
393
+ [k: string]: string;
661
394
  };
395
+ body: unknown;
662
396
  }>;
663
397
  }, {
664
- slug: string;
665
- description: string;
666
- input: z.ZodObject<{
667
- guildId: z.ZodString;
668
- roleId: z.ZodString;
669
- reason: z.ZodOptional<z.ZodString>;
670
- }, z.core.$strip>;
671
- output: z.ZodObject<{
672
- success: z.ZodBoolean;
673
- }, z.core.$strip>;
674
- idempotent: true;
675
- options: {
676
- guildId: typeof import("./options.js").guildOptions;
677
- roleId: typeof import("./options.js").roleOptions;
398
+ success: boolean;
399
+ role: {
400
+ id: string;
401
+ name: string;
678
402
  };
679
- run({ client, input }: {
680
- input: {
681
- guildId: string;
682
- roleId: string;
683
- reason?: string | undefined;
684
- };
685
- client: {
686
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
687
- status: number;
688
- headers: {
689
- [k: string]: string;
690
- };
691
- body: unknown;
692
- }>;
403
+ }> & {
404
+ slug: "createRole";
405
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
406
+ guildId: z.ZodString;
407
+ roleId: z.ZodString;
408
+ reason: z.ZodOptional<z.ZodString>;
409
+ }, z.core.$strip>, z.ZodObject<{
410
+ success: z.ZodBoolean;
411
+ }, z.core.$strip>, {
412
+ mentionRoleIds: string[];
413
+ respondToChannelIds: string[];
414
+ respondToGlobalMentions: boolean;
415
+ apiUrl?: string | undefined;
416
+ applicationId?: string | undefined;
417
+ publicKey?: string | undefined;
418
+ botUsername?: string | undefined;
419
+ }, {
420
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
421
+ status: number;
422
+ headers: {
423
+ [k: string]: string;
693
424
  };
694
- options: object;
695
- req: import("frogbot").FrogBotRequest;
696
- }): Promise<{
697
- success: true;
425
+ body: unknown;
698
426
  }>;
699
427
  }, {
700
- slug: string;
701
- description: string;
702
- input: z.ZodObject<{
703
- guildId: z.ZodString;
704
- userId: z.ZodString;
705
- reason: z.ZodOptional<z.ZodString>;
706
- }, z.core.$strip>;
707
- output: z.ZodObject<{
708
- success: z.ZodBoolean;
709
- }, z.core.$strip>;
710
- idempotent: true;
711
- options: {
712
- guildId: typeof import("./options.js").guildOptions;
713
- };
714
- run({ client, input }: {
715
- input: {
716
- guildId: string;
717
- userId: string;
718
- reason?: string | undefined;
719
- };
720
- client: {
721
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
722
- status: number;
723
- headers: {
724
- [k: string]: string;
725
- };
726
- body: unknown;
727
- }>;
428
+ success: boolean;
429
+ }> & {
430
+ slug: "deleteRole";
431
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
432
+ guildId: z.ZodString;
433
+ userId: z.ZodString;
434
+ reason: z.ZodOptional<z.ZodString>;
435
+ }, z.core.$strip>, z.ZodObject<{
436
+ success: z.ZodBoolean;
437
+ }, z.core.$strip>, {
438
+ mentionRoleIds: string[];
439
+ respondToChannelIds: string[];
440
+ respondToGlobalMentions: boolean;
441
+ apiUrl?: string | undefined;
442
+ applicationId?: string | undefined;
443
+ publicKey?: string | undefined;
444
+ botUsername?: string | undefined;
445
+ }, {
446
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
447
+ status: number;
448
+ headers: {
449
+ [k: string]: string;
728
450
  };
729
- options: object;
730
- req: import("frogbot").FrogBotRequest;
731
- }): Promise<{
732
- success: true;
451
+ body: unknown;
733
452
  }>;
734
453
  }, {
735
- slug: string;
736
- description: string;
737
- input: z.ZodObject<{
738
- path: z.ZodString;
739
- method: z.ZodEnum<{
740
- GET: "GET";
741
- PUT: "PUT";
742
- DELETE: "DELETE";
743
- POST: "POST";
744
- PATCH: "PATCH";
745
- }>;
746
- headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
747
- queryParams: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
748
- body: z.ZodOptional<z.ZodUnknown>;
749
- }, z.core.$strip>;
750
- output: z.ZodObject<{
751
- status: z.ZodNumber;
752
- headers: z.ZodRecord<z.ZodString, z.ZodString>;
753
- body: z.ZodUnknown;
754
- }, z.core.$strip>;
755
- idempotent: false;
756
- run({ client, input }: {
757
- input: {
758
- path: string;
759
- method: "GET" | "PUT" | "DELETE" | "POST" | "PATCH";
760
- headers: Record<string, string>;
761
- queryParams: Record<string, string | number | boolean>;
762
- body?: unknown;
763
- };
764
- client: {
765
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
766
- status: number;
767
- headers: {
768
- [k: string]: string;
769
- };
770
- body: unknown;
771
- }>;
772
- };
773
- options: object;
774
- req: import("frogbot").FrogBotRequest;
775
- }): Promise<{
454
+ success: boolean;
455
+ }> & {
456
+ slug: "banMember";
457
+ }, import("frogbot").PieceActionDefinition<z.ZodObject<{
458
+ path: z.ZodString;
459
+ method: z.ZodEnum<{
460
+ GET: "GET";
461
+ PUT: "PUT";
462
+ DELETE: "DELETE";
463
+ POST: "POST";
464
+ PATCH: "PATCH";
465
+ }>;
466
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
467
+ queryParams: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
468
+ body: z.ZodOptional<z.ZodUnknown>;
469
+ }, z.core.$strip>, z.ZodObject<{
470
+ status: z.ZodNumber;
471
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
472
+ body: z.ZodUnknown;
473
+ }, z.core.$strip>, {
474
+ mentionRoleIds: string[];
475
+ respondToChannelIds: string[];
476
+ respondToGlobalMentions: boolean;
477
+ apiUrl?: string | undefined;
478
+ applicationId?: string | undefined;
479
+ publicKey?: string | undefined;
480
+ botUsername?: string | undefined;
481
+ }, {
482
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
776
483
  status: number;
777
484
  headers: {
778
485
  [k: string]: string;
779
486
  };
780
487
  body: unknown;
781
488
  }>;
489
+ }, {
490
+ status: number;
491
+ headers: Record<string, string>;
492
+ body: unknown;
493
+ }> & {
494
+ slug: "sendApiRequest";
782
495
  }];
783
496
  readonly triggers: readonly [{
784
497
  slug: string;
498
+ label?: string;
785
499
  description: string;
500
+ input: z.ZodObject<{}, z.core.$strip>;
501
+ output?: z.ZodRecord<z.ZodString, z.ZodUnknown> | undefined;
502
+ sample?: Record<string, unknown> | undefined;
503
+ } & {
786
504
  type: "app";
787
505
  event: string;
788
- input: z.ZodObject<{}, z.core.$strip>;
789
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
790
- sample: {};
791
- run({ req }: import("frogbot").PieceRunArgs<object, object, import("./client.js").DiscordClient>): Promise<{
792
- data: Record<string, unknown>;
793
- dedupeKey: string;
794
- }[]>;
506
+ run(args: import("frogbot").PieceRunArgs<Record<string, never>, {
507
+ mentionRoleIds: string[];
508
+ respondToChannelIds: string[];
509
+ respondToGlobalMentions: boolean;
510
+ apiUrl?: string | undefined;
511
+ applicationId?: string | undefined;
512
+ publicKey?: string | undefined;
513
+ botUsername?: string | undefined;
514
+ }, {
515
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
516
+ status: number;
517
+ headers: {
518
+ [k: string]: string;
519
+ };
520
+ body: unknown;
521
+ }>;
522
+ }>): Promise<import("frogbot").TriggerEvent<Record<string, unknown>>[]>;
523
+ } & {
524
+ slug: "commandReceived";
795
525
  }, {
796
526
  slug: string;
527
+ label?: string;
797
528
  description: string;
529
+ input: z.ZodObject<{}, z.core.$strip>;
530
+ output?: z.ZodRecord<z.ZodString, z.ZodUnknown> | undefined;
531
+ sample?: Record<string, unknown> | undefined;
532
+ } & {
798
533
  type: "app";
799
534
  event: string;
800
- input: z.ZodObject<{}, z.core.$strip>;
801
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
802
- sample: {};
803
- run({ req }: import("frogbot").PieceRunArgs<object, object, import("./client.js").DiscordClient>): Promise<{
804
- data: Record<string, unknown>;
805
- dedupeKey: string;
806
- }[]>;
535
+ run(args: import("frogbot").PieceRunArgs<Record<string, never>, {
536
+ mentionRoleIds: string[];
537
+ respondToChannelIds: string[];
538
+ respondToGlobalMentions: boolean;
539
+ apiUrl?: string | undefined;
540
+ applicationId?: string | undefined;
541
+ publicKey?: string | undefined;
542
+ botUsername?: string | undefined;
543
+ }, {
544
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
545
+ status: number;
546
+ headers: {
547
+ [k: string]: string;
548
+ };
549
+ body: unknown;
550
+ }>;
551
+ }>): Promise<import("frogbot").TriggerEvent<Record<string, unknown>>[]>;
552
+ } & {
553
+ slug: "componentReceived";
807
554
  }, {
808
555
  slug: string;
556
+ label?: string;
809
557
  description: string;
558
+ input: z.ZodObject<{}, z.core.$strip>;
559
+ output?: z.ZodRecord<z.ZodString, z.ZodUnknown> | undefined;
560
+ sample?: Record<string, unknown> | undefined;
561
+ } & {
810
562
  type: "app";
811
563
  event: string;
812
- input: z.ZodObject<{}, z.core.$strip>;
813
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
814
- sample: {};
815
- run({ req }: import("frogbot").PieceRunArgs<object, object, import("./client.js").DiscordClient>): Promise<{
816
- data: Record<string, unknown>;
817
- dedupeKey: string;
818
- }[]>;
564
+ run(args: import("frogbot").PieceRunArgs<Record<string, never>, {
565
+ mentionRoleIds: string[];
566
+ respondToChannelIds: string[];
567
+ respondToGlobalMentions: boolean;
568
+ apiUrl?: string | undefined;
569
+ applicationId?: string | undefined;
570
+ publicKey?: string | undefined;
571
+ botUsername?: string | undefined;
572
+ }, {
573
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
574
+ status: number;
575
+ headers: {
576
+ [k: string]: string;
577
+ };
578
+ body: unknown;
579
+ }>;
580
+ }>): Promise<import("frogbot").TriggerEvent<Record<string, unknown>>[]>;
581
+ } & {
582
+ slug: "messageCreated";
819
583
  }, {
820
584
  slug: string;
585
+ label?: string;
821
586
  description: string;
587
+ input: z.ZodObject<{}, z.core.$strip>;
588
+ output?: z.ZodRecord<z.ZodString, z.ZodUnknown> | undefined;
589
+ sample?: Record<string, unknown> | undefined;
590
+ } & {
822
591
  type: "app";
823
592
  event: string;
824
- input: z.ZodObject<{}, z.core.$strip>;
825
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
826
- sample: {};
827
- run({ req }: import("frogbot").PieceRunArgs<object, object, import("./client.js").DiscordClient>): Promise<{
828
- data: Record<string, unknown>;
829
- dedupeKey: string;
830
- }[]>;
593
+ run(args: import("frogbot").PieceRunArgs<Record<string, never>, {
594
+ mentionRoleIds: string[];
595
+ respondToChannelIds: string[];
596
+ respondToGlobalMentions: boolean;
597
+ apiUrl?: string | undefined;
598
+ applicationId?: string | undefined;
599
+ publicKey?: string | undefined;
600
+ botUsername?: string | undefined;
601
+ }, {
602
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
603
+ status: number;
604
+ headers: {
605
+ [k: string]: string;
606
+ };
607
+ body: unknown;
608
+ }>;
609
+ }>): Promise<import("frogbot").TriggerEvent<Record<string, unknown>>[]>;
610
+ } & {
611
+ slug: "reactionAdded";
831
612
  }, {
832
613
  slug: string;
614
+ label?: string;
833
615
  description: string;
616
+ input: z.ZodObject<{}, z.core.$strip>;
617
+ output?: z.ZodRecord<z.ZodString, z.ZodUnknown> | undefined;
618
+ sample?: Record<string, unknown> | undefined;
619
+ } & {
834
620
  type: "app";
835
621
  event: string;
836
- input: z.ZodObject<{}, z.core.$strip>;
837
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
838
- sample: {};
839
- run({ req }: import("frogbot").PieceRunArgs<object, object, import("./client.js").DiscordClient>): Promise<{
840
- data: Record<string, unknown>;
841
- dedupeKey: string;
842
- }[]>;
622
+ run(args: import("frogbot").PieceRunArgs<Record<string, never>, {
623
+ mentionRoleIds: string[];
624
+ respondToChannelIds: string[];
625
+ respondToGlobalMentions: boolean;
626
+ apiUrl?: string | undefined;
627
+ applicationId?: string | undefined;
628
+ publicKey?: string | undefined;
629
+ botUsername?: string | undefined;
630
+ }, {
631
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
632
+ status: number;
633
+ headers: {
634
+ [k: string]: string;
635
+ };
636
+ body: unknown;
637
+ }>;
638
+ }>): Promise<import("frogbot").TriggerEvent<Record<string, unknown>>[]>;
639
+ } & {
640
+ slug: "reactionRemoved";
843
641
  }];
844
642
  }>;
845
643
  //# sourceMappingURL=index.d.ts.map