@notenoughupdates/discord-akairo
Advanced tools
Comparing version 9.0.10-dev.1642556098.bebde2e to 9.0.10-dev.1642740434.20b44c6
{ | ||
"name": "@notenoughupdates/discord-akairo", | ||
"version": "9.0.10-dev.1642556098.bebde2e", | ||
"version": "9.0.10-dev.1642740434.20b44c6", | ||
"description": "A highly customizable bot framework for Discord.js.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/src/index.js", |
@@ -165,4 +165,4 @@ "use strict"; | ||
compareStreaming(oldMember, newMember) { | ||
const s1 = oldMember.presence?.activities.find(c => c.type === "Streaming"); | ||
const s2 = newMember.presence?.activities.find(c => c.type === "Streaming"); | ||
const s1 = oldMember.presence?.activities.find(c => c.type === 1 /* Streaming */); | ||
const s2 = newMember.presence?.activities.find(c => c.type === 1 /* Streaming */); | ||
if (s1 === s2) | ||
@@ -169,0 +169,0 @@ return 0; |
@@ -291,3 +291,3 @@ "use strict"; | ||
id: u, | ||
type: "User", | ||
type: 2 /* User */, | ||
permission: true | ||
@@ -526,3 +526,4 @@ })) | ||
for (const option of interaction.options["_hoistedOptions"]) { | ||
if (option.type === "Subcommand" || option.type === "SubcommandGroup") | ||
if (option.type === 1 /* Subcommand */ || | ||
option.type === 2 /* SubcommandGroup */) | ||
continue; | ||
@@ -572,12 +573,12 @@ const originalOption = commandModule.slashOptions?.find(o => o.name === option.name); | ||
switch (option.type) { | ||
case "Boolean" || 5 /* Boolean */: | ||
case 5 /* Boolean */: | ||
convertedOptions[option.name] ??= false; | ||
break; | ||
case "Channel" || 7 /* Channel */: | ||
case "Integer" || 4 /* Integer */: | ||
case "Mentionable" || 9 /* Mentionable */: | ||
case "Number" || 10 /* Number */: | ||
case "Role" || 8 /* Role */: | ||
case "String" || 3 /* String */: | ||
case "User" || 6 /* User */: | ||
case 7 /* Channel */: | ||
case 4 /* Integer */: | ||
case 9 /* Mentionable */: | ||
case 10 /* Number */: | ||
case 8 /* Role */: | ||
case 3 /* String */: | ||
case 6 /* User */: | ||
default: | ||
@@ -919,3 +920,3 @@ convertedOptions[option.name] ??= null; | ||
else if (message.guild) { | ||
if (message.channel?.type === "DM") | ||
if (message.channel?.type === 1 /* DM */) | ||
return false; | ||
@@ -947,3 +948,3 @@ const missing = message.channel?.permissionsFor(message.guild.me)?.missing(command.clientPermissions); | ||
else if (message.guild) { | ||
if (message.channel?.type === "DM") | ||
if (message.channel?.type === 1 /* DM */) | ||
return false; | ||
@@ -950,0 +951,0 @@ const missing = message.channel?.permissionsFor(message.author)?.missing(command.userPermissions); |
{ | ||
"name": "@notenoughupdates/discord-akairo", | ||
"version": "9.0.10-dev.1642556098.bebde2e", | ||
"version": "9.0.10-dev.1642740434.20b44c6", | ||
"description": "A highly customizable bot framework for Discord.js.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/src/index.js", |
import { | ||
ActivityType, | ||
BufferResolvable, | ||
@@ -220,4 +221,4 @@ Collection, | ||
public compareStreaming(oldMember: GuildMember, newMember: GuildMember): 0 | 1 | 2 { | ||
const s1 = oldMember.presence?.activities.find(c => c.type === "Streaming"); | ||
const s2 = newMember.presence?.activities.find(c => c.type === "Streaming"); | ||
const s1 = oldMember.presence?.activities.find(c => c.type === ActivityType.Streaming); | ||
const s2 = newMember.presence?.activities.find(c => c.type === ActivityType.Streaming); | ||
if (s1 === s2) return 0; | ||
@@ -224,0 +225,0 @@ if (s1) return 1; |
@@ -5,4 +5,6 @@ import { | ||
ApplicationCommandOptionType, | ||
ApplicationCommandPermissionType, | ||
AutocompleteInteraction, | ||
Awaitable, | ||
ChannelType, | ||
ChatInputCommandInteraction, | ||
@@ -537,3 +539,3 @@ Collection, | ||
id: u, | ||
type: "User", | ||
type: ApplicationCommandPermissionType.User, | ||
permission: true | ||
@@ -800,3 +802,7 @@ })) | ||
for (const option of (interaction.options as CommandInteractionOptionResolver)["_hoistedOptions"]) { | ||
if (option.type === "Subcommand" || option.type === "SubcommandGroup") continue; | ||
if ( | ||
option.type === ApplicationCommandOptionType.Subcommand || | ||
option.type === ApplicationCommandOptionType.SubcommandGroup | ||
) | ||
continue; | ||
const originalOption = commandModule.slashOptions?.find(o => o.name === option.name); | ||
@@ -859,12 +865,12 @@ | ||
switch (option.type) { | ||
case "Boolean" || ApplicationCommandOptionType.Boolean: | ||
case ApplicationCommandOptionType.Boolean: | ||
convertedOptions[option.name] ??= false; | ||
break; | ||
case "Channel" || ApplicationCommandOptionType.Channel: | ||
case "Integer" || ApplicationCommandOptionType.Integer: | ||
case "Mentionable" || ApplicationCommandOptionType.Mentionable: | ||
case "Number" || ApplicationCommandOptionType.Number: | ||
case "Role" || ApplicationCommandOptionType.Role: | ||
case "String" || ApplicationCommandOptionType.String: | ||
case "User" || ApplicationCommandOptionType.User: | ||
case ApplicationCommandOptionType.Channel: | ||
case ApplicationCommandOptionType.Integer: | ||
case ApplicationCommandOptionType.Mentionable: | ||
case ApplicationCommandOptionType.Number: | ||
case ApplicationCommandOptionType.Role: | ||
case ApplicationCommandOptionType.String: | ||
case ApplicationCommandOptionType.User: | ||
default: | ||
@@ -1235,3 +1241,3 @@ convertedOptions[option.name] ??= null; | ||
} else if (message.guild) { | ||
if (message.channel?.type === "DM") return false; | ||
if (message.channel?.type === ChannelType.DM) return false; | ||
const missing = message.channel?.permissionsFor(message.guild.me!)?.missing(command.clientPermissions); | ||
@@ -1263,3 +1269,3 @@ if (missing?.length) { | ||
} else if (message.guild) { | ||
if (message.channel?.type === "DM") return false; | ||
if (message.channel?.type === ChannelType.DM) return false; | ||
const missing = message.channel?.permissionsFor(message.author)?.missing(command.userPermissions); | ||
@@ -1266,0 +1272,0 @@ if (missing?.length) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
16398
912625