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 +3 -2
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
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
|
-
|
|
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.
|
|
303
|
+
'User-Agent': 'taverns.js/0.2.0',
|
|
303
304
|
},
|
|
304
305
|
};
|
|
305
306
|
if (bodyStr) {
|
package/dist/types.d.ts
CHANGED