Tags: detritusjs/client
Tags
0.16.2 (#30) * Add `run` to both the component button and select menu helper - Add `run` to both the component button and select menu helper -> Allows you to listen for a button press directly on the button helper itself -> Only listens for about 10 minutes (might change to customizable times in the future) - Fix `Structures.Message.deleted` not updating on channel/guild deletes - Update `Structures.Message` -> Add `.hasFlagEphemeral` - Update `Interactions.InteractionCommand` -> Default `global` to false if `global` isn't present and `guildIds` is present * Fix Component Helper's Typings * Update `Structures.Message` - Update `Structures.Message` -> Add `.canEdit` -> Add checks for ephemeral in `.canDelete` -> Default `.deleted` as true if is an ephemeral message * Add `Components`, Update `ShardClient` - Add `Components` to `Utils` -> Allows you to manage a message's components much easier as well as have a custom timeout and a listener to any button press on the message --> Timeout is defaulted to 10 minutes - Fix interaction commands not updating if a select menu option changes `required` - Update `Structures.Member` -> Add `.canEditRole()` (checks our role hierarchy with the role provided to see if its under us) * Update `Constants` - Update `Constants` -> Remove `COMPONENT_` constants -> Add `MAX_ACTION_ROW_BUTTONS` and `MAX_ACTION_ROW_SELECT_MENUS` - Update Components Types * Fix `ActionRow.isFull` * Add types to thread rest endpoints * 0.16.2 release
0.14.1 Release (#15) * Add support to clone BaseStructures and update `_UPDATE` events to return an old clone - Update `Structure` -> Add `.differencesBetween(Structure)` which will give you differences between two structures (Useful for cloned objects) -> Add `.hasDifference(key, value)` -> Add `.hasDifferences(rawObject)` -> Add `.hasDifferencesBetween(BaseStructure)` - Update `BaseStructure` -> Add `.clone()` which will clone the object -> Add `.isClone` property - Update `_UPDATE` Events -> `CHANNEL_UPDATE` --> Add old channel object under `{old, ...payload}` -> Overhaul `GUILD_EMOJIS_UPDATE` --> Update differences in payload `{differences: {created, deleted, updated}, ...payload}` ---> `created` is a `BaseCollection` made up of `Emoji`s ---> `deleted` is a `BaseCollection` made up of `Emoji`s ---> `updated` is a `BaseCollection` made up of `{emoji: Emoji, old: Emoji}` -> `GUILD_MEMBER_UPDATE` --> Add old member object under `{old, ...payload}` -> `GUILD_ROLE_UPDATE` --> Add old role object under `{old, ...payload}` -> `GUILD_UPDATE` --> Add old guild object under `{old, ...payload}` -> `MESSAGE_UPDATE` --> Add old message object under `{old, ...payload}` -> `PRESENCE_UPDATE` --> Add old presence object under `{old, ...payload}` -> `USER_UPDATE` --> Add old user object under `{old, ...payload}` -> `USERS_UPDATE` --> Add old user object under `{old, ...payload}` - Update `Role` -> Add `Role.editPosition(number, {reason})` * Re-add `widgetChannelId` and `widgetEnabled` to `Guild` * Update command parser for positional arguments, fix mention prefix when using CommandClient with ClusterClient - Update Command Parser for positional arguments -> Added ability to skip the parse, incase you wanted the attachment or something --> Returning [true, anyValue] for a positional argument type will skip it - Fixed CommandClient not populating the mention prefixes on startup when using ClusterClient -> it will now check if the mentions are enabled and the mentions arent populated every time a command is executed - Update BaseStructure difference checking -> Checks all the values more efficiently - Updated `Channel` -> Added `Channel.rtcRegion` (for voice channels) - Updated `Invite` -> Made `Invite.channel` type always available - Updated `Message` -> Made `Message._reactions` and `Message._stickers` not enumerable * Update package.json * Fixed a slight oversight
0.11.1 Release (#10) * Add `choices` and `help` to Command args - `choices` will compare the parsed arg value to itself - `help` will replace any kind of error message produced while parsing the arg or while comparing the arg in `choices` -> `:error` is replaced with the error message inside of the string -> `{help: 'Some error occured: :error'}`, `:error` will be replaced with the actual error message (like if it failed to parse to a number) - Replace `Command.args` with `Command.argParser` and add a setter to set via `Command.args = [arg, arg]` - Add a bunch of `setX` commands to the Command object * Add positional arg support and `required` parameter * Update package.json * Add link escaping to Markup Tools * add typings for `once` and `subscribe` on the main client objects * Fix differences in some objects on update - Fix `guildMemberUpdate` always having `{roles}` in the differences object - `guildMemberUpdate` can have a null `differences`, often, because it might be a user update that was announced via `usersUpdate` - `messageUpdate`, `attachments`, `embeds`, `mentions` should have better checks for being in the differences params - * Update `detritus-utils` version * Fix codestring escaping in the markup tool * Fix `embed.size` not counting author name - Fix `Embed.size` not counting author name - Add `MessageEmbed.size` and `MessageEmbed.length` * apparently forgot to put `mute` on voice states.. * Fix audit log options not parsing into int * Add `_new` properties to guild, overwrite, role * Add `activity` getter to message party invite - Add ability to set prefixes through a setter on the command object * cache subsequent `Command.names` calls * Add some performance fixes to `PRESENCE_UPDATE` handler - No longer diff the entire presence if only `USERS_UPDATE` is being listened to - Don't check `hasDifference` based off activity id since it could be `custom` or `spotify:1` which won't make it unique * Update to version 0.11.1
0.11.0 Release (#9) * detritus-client-rest upgrade * fix processes closing not clearing out waiting shards * Fix shards in cluster client getting hung up waiting for an identify Caused by when a shard fails to identify after requesting * Performance Changes - Removed Multi-Chunk from `gateway.loadAllMembers` to future-proof - Make `ClusterClient` distrbute and fetch both applications and oauth2application to its children - Add `Shard.requestGuildMembers()` which will generate a nonce and return all members found from the gateway - Add `guildMembersChunk.chunkCount` and `guildMembersChunk.chunkIndex` - Add `Role.permissionsNew` - Added `rest.raw` which is the raw rest client that allows raw responses from Discord - Added `Guild.isReady` - Added `Guild.fetchMembersSearch()` (uses rest) - Added `Guild.requestMembers()` (uses gateway) - Added `Role.botId` `Role.integrationId` `Role.isBoosterRole` which all use the new `Role.tags` * Update package.json * Update nonce used in `ShardClient.requestGuildMembers()` No longer randomly generated, instead it'll base it off the query/userids Allows for re-use of same queries if sent in at the same time * Fix longer aliases not having priority in command parsing * Argument parsing enhacements/fix and message fix - Fix `message.convertMessage()` ignoring an empty string for text - Allow ability to use `arg.default` for the main command argument, meaning `Command.default` now is settable * Add function to CommandClient and add `permissionsIgnoreClientOwner` - Added `onMessageCheck` to CommandClient - Added `permissionsIgnoreClientOwner` to Command - Added Jump Channel and Jump Channel Message to regexes - Added `channelId`, `guildId`, `messageId` to messageUpdate event - Removed `isPartial` from User * Add `commandResponseDelete` to `CommandClient` and `triggerTypingAfter` to `Command` - `triggerTypingAfter` will trigger typing after x amount of ms if the command run function takes too long (the client waits for 1500 ms of typing before sending in the typing event) - `commandResponseDelete` event is sent out if the context reply is deleted (`commandDelete` is when the actual command message gets deleted) * Update to version 0.11.0 - Fix channels being stored for guilds fetched (not from gateway)