bdsx-discord-module
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -7,3 +7,2 @@ "use strict"; | ||
var event = require("events"); | ||
var v10_1 = require("discord-api-types/v10"); | ||
var Client = /** @class */ (function () { | ||
@@ -378,3 +377,3 @@ function Client(token, intents) { | ||
Guild.prototype.registerSlashCommand = function (command) { | ||
if (command.type !== v10_1.ApplicationCommandType.ChatInput) | ||
if (command.type !== 1) | ||
throw new TypeError("registerSlashCommand() can only register slash command."); | ||
@@ -394,3 +393,3 @@ request({ | ||
headers: { "Content-Type": "application/json" }, | ||
body: JSON.stringify({ type: v10_1.InteractionResponseType.ChannelMessageWithSource, data: content }) | ||
body: JSON.stringify({ type: 4, data: content }) | ||
}, function (er, _res, body) { | ||
@@ -397,0 +396,0 @@ }); |
@@ -403,3 +403,3 @@ import * as request from "request" | ||
registerSlashCommand(command: APIApplicationCommand) { | ||
if (command.type !== ApplicationCommandType.ChatInput) throw new TypeError("registerSlashCommand() can only register slash command.") | ||
if (command.type !== 1) throw new TypeError("registerSlashCommand() can only register slash command.") | ||
request({ | ||
@@ -418,3 +418,3 @@ url: `https://discord.com/api/v10/applications/${this.client.applicationId}/guilds/${this.info.id}/commands`, | ||
headers: { "Content-Type": "application/json" }, | ||
body: JSON.stringify({ type: InteractionResponseType.ChannelMessageWithSource, data: content }) | ||
body: JSON.stringify({ type: 4, data: content }) | ||
}, (er, _res, body: string) => { | ||
@@ -421,0 +421,0 @@ }) |
{ | ||
"name": "bdsx-discord-module", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40170
955