panda-discord

Command framework for building Discord bots with discord.js, allowing chat and slash commands to run through one handler.

APACHE-2.0 License

Downloads
43
Stars
2
Committers
2

Bot releases are visible (Hide)

panda-discord - 4.5.0 Latest Release

Published by jackson-nestelroad 8 months ago

Features

  • Add handleUncaughtEventHandlerError function to the PandaDiscordBot interface.
panda-discord - 4.4.2

Published by jackson-nestelroad 10 months ago

Features

  • Update discord.js to 14.14.1.
  • Use custom status for help presence.
panda-discord - 4.4.1

Published by jackson-nestelroad over 1 year ago

Features

  • Update discord.js to 4.4.1.
  • Add ShowArgsCommand to the library.
panda-discord - 4.4.0

Published by jackson-nestelroad over 1 year ago

Features

  • Upgraded to TypeScript 5.0.
  • Added strict null checks across the codebase for compatibility with users who use strictNullChecks.

Bug Fixes

  • Fixed an issue where bots would not reply to slash subcommands sent by users with invalid permissions. Bot now responds with "Permission denied."
panda-discord - 4.3.2

Published by jackson-nestelroad almost 2 years ago

Bug Fixes

  • Fixed bug where chat parser was not used for chat input commands, which broke rest of content arguments.
panda-discord - 4.3.1

Published by jackson-nestelroad almost 2 years ago

Bug Fixes

  • Command no longer require prefix for BaseHelpService autocomplete.
panda-discord - 4.3.0

Published by jackson-nestelroad almost 2 years ago

Features

  • Force specifying a reason when user is put on timeout.
  • Send embed to user through TimeoutService.
  • Return a boolean from execute, executeChat, and executeSlash methods indicating if the command was actually run or not due to failed preconditions, such as permission validation or command cooldown.

Bug Fixes

  • Fixed running command help from autocomplete suggestion when a command and category share the same name.
panda-discord - 4.2.0

Published by jackson-nestelroad almost 2 years ago

Features

  • Updated to discord.js version 14.6.0.
  • Changed BaseCommand to BaseChatInputCommand for representing all chat input commands, which can still be run as chat or slash commands.
  • Added new BaseCommand class (replaces the old one) that represents any command that can be run from the Discord bot.
  • Added support for context menu commands with the classes MessageContextMenuCommand, UserContextMenuCommand, and GuildMemberContextMenuCommand. All of these derive from BaseContextMenuCommand.
  • Added ParamaterizedCommand.contextMenu for attaching context menu commands to a chat input command. These are automatically created and attached to the bot when the command map is built.
  • Added EnabledCommandType.ContextMenu for enabling context menu commands.
  • Added EnabledCommandType.Application for enabling all application commands (currently slash and context menu commands).
  • Changed PandaDiscordBot.createAndEnableSlashCommands and PandaDiscordBot.deleteAllSlashCommands to PandaDiscordBot.createAndEnableApplicationCommands and PandaDiscordBot.deleteAllApplicationCommands respectively. Commands are deleted based on the enabled command type given when the bot is created.
  • Added PandaDiscordBot.contextMenuCommands for holding all context menu commands, accessible by name.
  • Added BaseChatInputCommand.isParameterized() for type checking if a command accepts arguments.
  • Made BaseChatInputCommand.isNested into a function, similar to isParameterized(), for type checking if a command is nested.
  • Renamed BaseChatInputCommand.slashGuildId to BaseCommand.guildId.
  • Added ParamaterizedCommand.parseArguments for manually parsing arguments. Useful for context menu commands, where some arguments are given to the command after it has already started running.
  • Moved checking if a command should run based on configuration and permissions to its execute methods, rather than relying on callers to check them.
  • Exported MessageCommandSource, InteractionCommandSource, and MockCommandSource for better typing of command sources given to command handlers and internal parsers.
  • Added CommandInteractionCommandSource for command sources that are known to have a command interaction (slash or context menu) inside of them.
  • Added context menu command handling to the default interaction event.
panda-discord - 4.1.0

Published by jackson-nestelroad almost 2 years ago

Features

  • Change PandaDiscordBot.getPrefix to always be synchronous.
  • Support argument-level autocomplete.
  • Default autocomplete implementation on default help service and help handlers.
panda-discord - 4.0.0

Published by jackson-nestelroad almost 2 years ago

Features

  • Large refactoring of how the help command works. Help is now provided by the helpService member of the bot class. Queries are matched and handled by help handlers, which can be created by framework users. DefaultHelpService is provided for default (legacy) behavior.
  • New runHelpNamedArg option allows users to get help for a command by specifying a named argument, such as --help, when running the command.
  • Users will receive how long their cooldown is when receiving a command cooldown message.
panda-discord - 3.2.0

Published by jackson-nestelroad about 2 years ago

Bug Fixes

  • Show correct command name in help examples.
  • Run transformers when using default values.
panda-discord - 3.1.4

Published by jackson-nestelroad about 2 years ago

Features

  • Add MockCommandSourceBase for creating fake command sources with custom functionality.
panda-discord - 3.1.3

Published by jackson-nestelroad about 2 years ago

Features

  • Add Warning embed template.
  • Allow custom event names in Event type.
panda-discord - 3.1.2

Published by jackson-nestelroad about 2 years ago

Features

  • Fix slash command update bug when moving from complex command to simple command where options would not be deleted
panda-discord - 3.1.0

Published by jackson-nestelroad about 2 years ago

Features

  • Change EnabledCommandType.Chat to EnabledCommandType.Message for consistency.
  • Allow commands to be disabled as chat commands.
  • Wrapper function PandaDiscordBot.sendErrorsToInteraction for working with non-command interactions.
  • Shard resume event for presence updates
panda-discord - 3.0.0

Published by jackson-nestelroad about 2 years ago

Features

  • Update to discord.js 14.3.0.
  • Specify message and slash commands in bot configuration.
  • Command permissions based on member permissions.
  • Member permission overrides for individual commands.
  • Allow commands in direct messages.
  • Restrict channel types for channel arguments on slash commands.
  • Attachments to message and slash commands.
panda-discord - 2.2.5

Published by jackson-nestelroad over 2 years ago

Update to discord.js/13.8.0.

panda-discord - 2.2.4

Published by jackson-nestelroad almost 3 years ago

Bug Fixes

  • Private categories will no longer create slash commands.
panda-discord - 2.2.3

Published by jackson-nestelroad almost 3 years ago

Features

  • Refactored the way backslashes are understood by the bot.
    • Backslashes will be restored to the argument string when attempting to escape characters that need not be escaped.
panda-discord - 2.2.2

Published by jackson-nestelroad almost 3 years ago

Features

  • Use named argument prefix alone (such as --) to stop argument parsing early.
Package Rankings
Top 13.97% on Npmjs.org
Related Projects