New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@duxcore/interactive-discord

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@duxcore/interactive-discord - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6

14

example/src/index.ts

@@ -19,18 +19,18 @@ import Discord, { MessageEmbed } from 'discord.js';

const buttons = new SlashCommand({ name: 'buttons', description: 'Sends various button components', guilds: myGuildId })
const buttons = new SlashCommand({ name: 'buttons', description: 'Sends various button components' })
interactiveClient.commands.register(buttons)
const editableButtons = new SlashCommand({ name: 'editable-buttons', description: 'Sends various button components that edit the orignal message', guilds: myGuildId })
const editableButtons = new SlashCommand({ name: 'editable-buttons', description: 'Sends various button components that edit the orignal message' })
interactiveClient.commands.register(editableButtons)
const selection = new SlashCommand({ name: 'selection', description: 'Sends basic selection component', guilds: myGuildId })
const selection = new SlashCommand({ name: 'selection', description: 'Sends basic selection component' })
interactiveClient.commands.register(selection)
const multiSelect = new SlashCommand({ name: 'multi-select', description: 'Sends multi select component', guilds: myGuildId })
const multiSelect = new SlashCommand({ name: 'multi-select', description: 'Sends multi select component' })
interactiveClient.commands.register(multiSelect)
const embed = new SlashCommand({ name: 'embed', description: 'Sends embed with button components', guilds: myGuildId })
const embed = new SlashCommand({ name: 'embed', description: 'Sends embed with button components' })
interactiveClient.commands.register(embed)
const emoji = new SlashCommand({ name: 'emoji', description: 'Sends button components with emoji content', guilds: myGuildId })
const emoji = new SlashCommand({ name: 'emoji', description: 'Sends button components with emoji content' })
interactiveClient.commands.register(emoji)

@@ -41,3 +41,3 @@ })

if (!interaction.isHandled) {
switch (interaction.command?.name) {
switch (interaction.raw.data.name) {
case "buttons":

@@ -44,0 +44,0 @@

@@ -5,3 +5,3 @@ {

"description": "A package that will allow you to seamlessly integrate discord interactions into your bot.",
"version": "1.3.5",
"version": "1.3.6",
"license": "GPL-3.0",

@@ -8,0 +8,0 @@ "main": "lib/index",

import { SlashCommand } from "../structures/SlashCommand";
import { ApplicationCommand } from "./types/command";
import { ApplicationCommand, ApplicationCommandOption } from "./types/command";

@@ -7,3 +7,3 @@ // false - Command has been changed

export function testCommandUnchanged(command: SlashCommand, reference: ApplicationCommand): boolean{
if (command.name !== reference.name) return false
/* if (command.name !== reference.name) return false
if (command.description !== reference.description) return false

@@ -26,5 +26,13 @@ if (command.options.length !== reference.options?.length) return false

}
}
} */
const referenceOpts = (reference.options ?? []);
const tests = [
(command.name == reference.name),
(command.description == reference.description),
(command.options.length == referenceOpts.length)
]
return true
if (tests.includes(false)) return false;
else return true;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc