Skip to content

v2.0.0

Compare
Choose a tag to compare
@favna favna released this 16 Oct 16:19
· 645 commits to main since this release

What's Changed

2.0.0 (2021-10-16)

⚠ BREAKING CHANGES

  • For TypeScript users only, if you were previously using from or fromAsync and you expected the error result to be of type Error, it will now be unknown. You can reset this back to Error by providing it as the second generic type argument.
  • command: For TypeScript users please rename your Command#run methods to Command#messageRun
  • Awaited type has been renamed to Awaitable
  • Updated @sapphire/pieces to 3.0.0
  • Removed Command#categories, use CommandStore#categories instead
  • arguments: Changed the error message of DateArgument
  • arguments: Changed the error message of FloatArgument
  • arguments: Changed the error message of NumberArgument
  • arguments: Changed the error message of IntegerArgument
  • arguments: Changed the error message of all arguments that must be run in a guild
  • arguments: Changed the error message of GuildNewsThreadChannelArgument
  • arguments: Changed the error message of GuildPrivateThreadChannelArgument
  • arguments: Changed the error message of GuildPublicThreadChannelArgument
  • arguments: Changed the error message of GuildStageVoiceChannelArgument
  • arguments: Changed the error message of GuildTextChannelArgument
  • arguments: Changed the error message of GuildThreadChannelArgument
  • arguments: Changed the error message of GuildVoiceChannelArgument
  • arguments: Changed the error message of GuildMemberArgument
  • arguments: Changed the error message of UserArgument
  • arguments: Made MessageArgumentContext private
  • arguments: Stop exposing the channel property in context of the ChannelArgument error
  • arguments: Stop exposing the channel property in context of the GuildCategoryChannelArgument error
  • arguments: Stop exposing the channel property in context of the GuildNewsChannelArgument error
  • arguments: Stop exposing the channel property in context of the GuildPrivateThreadArgument error
  • arguments: Stop exposing the channel property in context of the GuildStageVoiceChannelArgument error
  • arguments: Stop exposing the channel property in context of the GuildTextChannelArgument error
  • arguments: Stop exposing the channel property in context of the GuildThreadChannelArgument error
  • arguments: Stop exposing the channel property in context of the GuildVoiceChannelArgument error
  • arguments: Rename Identifiers.ArgumentBoolean to Identifiers.ArgumentBooleanError
  • arguments: Rename Identifiers.ArgumentCategoryChannel to Identifiers.ArgumentGuildCategoryChannelError
  • arguments: Rename Identifiers.ArgumentChannel to Identifiers.ArgumentChannelError
  • arguments: Rename Identifiers.ArgumentDate to Identifiers.ArgumentDateError
  • arguments: Rename Identifiers.ArgumentDateTooSmall to Identifiers.ArgumentDateTooEarly
  • arguments: Rename Identifiers.ArgumentDateTooBig to Identifiers.ArgumentDateTooFar
  • arguments: Rename Identifiers.ArgumentDMChannel to Identifiers.ArgumentDMChannelError
  • arguments: Rename Identifiers.ArgumentFloat to Identifiers.ArgumentFloatError
  • arguments: Rename Identifiers.ArgumentFloatTooBig to Identifiers.ArgumentFloatTooLarge
  • arguments: Rename Identifiers.ArgumentGuildChannel to Identifiers.ArgumentGuildChannelError
  • arguments: Rename Identifiers.ArgumentGuildChannelMissingGuild to Identifiers.ArgumentGuildChannelMissingGuildError
  • arguments: Rename Identifiers.ArgumentHyperlink to Identifiers.ArgumentHyperlinkError
  • arguments: Rename Identifiers.ArgumentInteger to Identifiers.ArgumentIntegerError
  • arguments: Rename Identifiers.ArgumentIntegerTooBig to Identifiers.ArgumentIntegerTooLarge
  • arguments: Rename Identifiers.ArgumentMember to Identifiers.ArgumentMemberError
  • arguments: Rename Identifiers.ArgumentMessage to Identifiers.ArgumentMessageError
  • arguments: Rename Identifiers.ArgumentNewsChannel to Identifiers.ArgumentGuildNewsChannelError
  • arguments: Rename Identifiers.ArgumentNumber to Identifiers.ArgumentNumberError
  • arguments: Rename Identifiers.ArgumentNumberTooBig to Identifiers.ArgumentNumberTooLarge
  • arguments: Rename Identifiers.ArgumentRole to Identifiers.ArgumentRoleError
  • arguments: Rename Identifiers.ArgumentTextChannel to Identifiers.ArgumentGuildTextChannel
  • arguments: Rename Identifiers.ArgumentUser to Identifiers.ArgumentUserError
  • arguments: Rename Identifiers.ArgumentVoiceChannel to Identifiers.ArgumentGuildVoiceChannel
  • Identifiers.PreconditionPermissions has been renamed to Identifiers.PreconditionClientPermissions
  • UserError identifier preconditionPermissions has been renamed to preconditionClientPermissions
  • Permissions precondition has been renamed to ClientPermissions
  • PermissionsPrecondition class has been renamed to ClientPermissionsPrecondition
  • listener: Listeners will now be automatically unloaded if no emitter is found
  • Changed guildChannel argument to return GuildChannel | ThreadChannel.
  • Changed SapphireClient.id's type to Snowflake | null.
  • Changed SapphireClientOptions.id's type to Snowflake | null.
  • Removed Events.GuildMemberSpeaking.
  • Removed StoreRegistry, it is now re-exported from @sapphire/pieces.
  • Renamed ArgType.categoryChannel to guildCategoryChannel.
  • Renamed ArgType.newsChannel to guildNewsChannel.
  • Renamed ArgType.textChannel to guildTextChannel.
  • Renamed ArgType.voiceChannel to guildVoiceChannel.
  • Renamed CommandPreConditions.NewsOnly to GuildNewsOnly.
  • Renamed CommandPreConditions.TextOnly to GuildTextOnly.
  • Renamed Identifiers.PreconditionNewsOnly to PreconditionGuildNewsOnly.
  • Renamed Identifiers.PreconditionTextOnly to PreconditionGuildTextOnly.
  • Renamed Preconditions.NewsOnly to GuildNewsOnly.
  • Renamed Preconditions.TextOnly to GuildTextOnly.
  • Renamed the possible values for CommandOptionsRunType.
  • Updated CooldownContext.delay to not be optional.
  • Updated discord.js requirement to v13.
  • Changed Command#preconditions to PreconditionContainerArray.
  • Removed Command#resolveConstructorPreConditions.
  • Renamed CommandOptions.cooldownBucket to cooldownLimit.
  • Renamed CommandOptions.cooldownDuration to cooldownDelay.
  • Renamed BucketType to BucketScope.
  • Changed PreconditionSingleResolvableDetails to take a type parameter.
  • Changed PreconditionSingleResolvable to use Preconditions's type.
  • Renamed CooldownContext.bucketType to scope.
  • Renamed Event to Listener
  • Renamed EventStore to ListenerStore
  • Changed events directory from events to listeners
  • Renamed SapphireClientOptions.loadDefaultErrorEvents to loadDefaultErrorListeners
  • Renamed StoreRegistryEntries.events to StoreRegistryEntries.listeners
  • Refactored Events enum to be an object, so we can use discord.js's constants
  • Renamed Events.EventError to Events.ListenerError
  • Renamed EventErrorPayload to ListenerErrorPayload
  • Renamed Events.Ready to Events.ClientReady
  • Renamed Events.Message to Events.MessageCreate
  • Flattened CommandOptions.strategyOptions into CommandOptions
  • Changed CommandOptions.preconditions to always require an array
  • Updated @sapphire/pieces to 2.0.0
  • Renamed PieceContextExtras to Container, usage and augmentation is the same.
  • Removed Store.injectedContext, use globally exported container
    variable instead.
  • Renamed Store#context to Store#container.
  • Renamed Piece#context to Piece#container.

Features

  • add Result#from and Result#fromAsync (#267) (300f2ed)
  • Add typing property to fire TextChannel.sendTyping() when a command is accepted (#258) (71c1883)
  • add managed role mention prefix support (#289) (7846d6c)
  • add partial dm channel argument (#288) (c8c74de)
  • add UserPermissions precondition (#252) (2bb2e12)
  • added auto-preconditions (#199) (7e79e15)
  • arguments: extract logic to resolvers (#237) (32d591b)
  • client: added option to set a default cooldown for all commands (#294) (7734d59)
  • command: add command#messageRun method and deprecation warning for command#run (#299) (750c25c)
  • command: add CommandOptionsRunTypeEnum (#254) (2d21b03)
  • commands: add category getters (#244) (d438ac0)
  • cooldown: add cooldownFilteredUsers to exempt users from the cooldown precondition (#249) (8261770)
  • ILogger: add #has method, auto-register Store#logger (#221) (85bfacb)
  • member argument: slice off Discord discriminators before performing a query search (#301) (f6261ae)
  • NonePrefixedMessage event (#202) (a410bbf)
  • resolver: make resolveChannel parse mentions (#253) (506576e)
  • resolver: make resolveMessage parse channelId-messageId (#292) (5e915d0)
  • specify missing breaking changes (9097cf5)
  • stricter types for preconditions (#226) (4a3c76a)
  • update @sapphire/pieces to add ts-node support (7a1c5c6)
  • update to DiscordJS v13.2.0 (#295) (51808a5)
  • updated for pieces v3 (#260) (db6febd)

Bug Fixes

  • change Awaited to Awaitable (189c01f)

  • docs: it was always info (3ce4d71)

  • docs: update-tsdoc-for-vscode-may-2021 (#213) (857eaba)

  • explicitly type version as string (a8c9b39)

  • export CooldownContext and MessageArgumentContext (54ba95a)

  • fixed ESM bundle (7ca08b2)

  • fixed oversight in passing preconditions (#239) (380a4ef)

  • index: re-export StoreRegistryEntries from @sapphire/pieces (#243) (aa78ba9)

  • listener: add and remove maximum listeners (#230) (53681ad)

  • make from/fromAsync return unknown to match TypeScript (#300) (a83f0c9)

  • NonePrefixedMessage: rename to NonPrefixedMessage (#205) (ad8adbc)

  • preconditions: fixed TextOnly and NewsOnly (#222) (8cf1c2b)

  • preconditions: fixed UserPermissions precondition (1848f53)

  • preconditions: properly check for null in ClientPermissions and UserPermissions (#262) (852ee87)

  • remove peer deps, update dev deps, update READMEs (#210) (7cb9e3d)

  • types: use the correct channel parent type (#232) (8307313)

  • update @sapphire/pieces to v2.0.0 (#198) (5c95c32)

  • flatten command strategy options (#220) (fdc4aa4)

  • rename Event to Listener (#218) (e7ce612)

  • specify missing breaking changes (b9c36de)

  • switch to sapphire/*[@v2](https://github.com/v2) and discord.js@dev (#227) (cbf5d4e)

New Contributors

Full Changelog: v1.0.2...v2.0.0