taverns.js 0.2.0 → 0.2.1

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/rest.js CHANGED
@@ -235,7 +235,8 @@ class RESTClient extends events_1.EventEmitter {
235
235
  // ─── Bot Commands (Slash Commands) ─────────────────────
236
236
  /** Register or overwrite all slash commands for this bot. */
237
237
  async registerCommands(commands) {
238
- return this.put('/bots/@me/commands', commands);
238
+ const result = await this.put('/bots/@me/commands', commands);
239
+ return result ?? [];
239
240
  }
240
241
  /** Get all registered commands for this bot. */
241
242
  async getCommands() {
@@ -299,7 +300,7 @@ class RESTClient extends events_1.EventEmitter {
299
300
  'Authorization': `Bot ${this.token}`,
300
301
  'Content-Type': 'application/json',
301
302
  'Accept': 'application/json',
302
- 'User-Agent': 'taverns.js/0.1.0',
303
+ 'User-Agent': 'taverns.js/0.2.0',
303
304
  },
304
305
  };
305
306
  if (bodyStr) {
package/dist/types.d.ts CHANGED
@@ -341,7 +341,7 @@ export interface Interaction {
341
341
  options: Record<string, any>;
342
342
  }
343
343
  export interface InteractionCallbackData {
344
- content: string;
344
+ content?: string;
345
345
  ephemeral?: boolean;
346
346
  embeds?: Embed[];
347
347
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taverns.js",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "SDK for building Tavern bots for the Taverns platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",