Skip to content

Releases: detritusjs/client

0.16.2

25 Aug 19:15
211252f
Compare
Choose a tag to compare
  • 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
    -> Add .canEdit
    -> Add checks for ephemeral in .canDelete
    -> Default .deleted as true if is an ephemeral message

  • 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
    -> 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.14.1

28 Mar 19:28
2e82ae2
Compare
Choose a tag to compare
  • 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 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
    -> Updated difference checking to be more efficient

  • 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 Emojis
    ---> deleted is a BaseCollection made up of Emojis
    ---> 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}

  • 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 Role
    -> Add Role.editPosition(number, {reason})

0.11.1

20 Aug 06:18
6430a9a
Compare
Choose a tag to compare

Command Arguments
-> Renamed Command.args to Command.argParser and make Command.args a setter
-> Added positional argument support
--> {type: [{name: 'arg1'}, {name: 'arg2', consume: true}]}
-> Added choices parameter
-> Added required parameter
-> Added help parameter
--> A parameter failing to be inside choices or is required but isn't passed in will use this value as the error message
-> Cache subsequent Command.names calls (performance fix)

Add typings for once and subscribe on Client Objects
-> They're now properly typed like the on listener

Differences Fixes
-> 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

Markup Tools
-> Fix codestring escaping
-> Add link escaping

Embed Helper
-> Fix Embed.size not counting author name

Guild Structure
-> Added permissions_new

MessageActivity Structure
-> Added activity getter, to get the related activity to the invite

MessageEmbed Structure
-> Add MessageEmbed.size and MessageEmbed.length

Message Structure
-> Add Message.mentionHere (Checks to see if Message.mentionEveryone is from @here)
-> Add better difference checking (for messageUpdate listeners)

Overwrite Structure
-> Added allow_new, deny_new

Role Structure
-> Added permissions_new

Voice State Structure
-> Added mute property (forgot this a long time ago apparently)

Events

  • PRESENCE_UPDATE
    -> 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

0.11.0

25 Jul 06:24
8dc4d2c
Compare
Choose a tag to compare
  • Changed CommandCluster options to default useClusterClient as true.

  • Changed file uploading keys
    -> name renamed to key and data renamed to value.
    -> createMessage({file: {data: Buffer.alloc(1), filename: 'file.txt', name: 'file'}} to {file: {filename: 'file.txt', key: 'file', value: Buffer.alloc(1)}}

  • Changed rest client to use node-fetch in the back.

  • 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

  • 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)

  • Fix channels being stored for guilds fetched (not from gateway)

  • 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