Skip to content

Commit ec3c584

Browse files
feat(registrar): include application payload in getRegistrar return value
1 parent 8861437 commit ec3c584

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "discord.https",
3-
"version": "3.0.8",
3+
"version": "3.0.9",
44
"description": "Discord.https is a modular library for building and managing Discord HTTP interactions with the Discord API. It provides tools for routing and managing interaction efficiently.",
55
"main": "./dist/index.js",
66
"type": "module",

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,10 @@ class Client extends HttpInteractionServer {
415415
* Returns helpers for registering slash commands.
416416
*
417417
* @param log - Log progress. Defaults to true.
418-
* @returns Methods to register commands globally or locally.
418+
* @returns An object containing:
419+
* - `globalSlashRegistrar`: Function to register commands globally.
420+
* - `localSlashRegistrar(guildId: string)`: Function to register commands locally for a specific guild, requires the guild ID as a parameter.
421+
* - `payload`: The payload returned from `GET /applications/@me`.
419422
*/
420423
async getRegistar(log = true) {
421424
const commandsBody = this.router.CommandDefinitions;
@@ -451,6 +454,7 @@ class Client extends HttpInteractionServer {
451454
}
452455
var upperThis = this;
453456
return {
457+
payload: currentClient,
454458
async globalSlashRegistar() {
455459
if (log) {
456460
console.log(

0 commit comments

Comments
 (0)