Releases: detritusjs/client
0.16.2
-
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
-> Defaultglobal
to false ifglobal
isn't present andguildIds
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
toUtils
-> 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
-> RemoveCOMPONENT_
constants
-> AddMAX_ACTION_ROW_BUTTONS
andMAX_ACTION_ROW_SELECT_MENUS
-
Update Components Types
-
Fix
ActionRow.isFull
-
Add types to thread rest endpoints
0.14.1
-
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}
-> OverhaulGUILD_EMOJIS_UPDATE
--> Update differences in payload{differences: {created, deleted, updated}, ...payload}
--->created
is aBaseCollection
made up ofEmoji
s
--->deleted
is aBaseCollection
made up ofEmoji
s
--->updated
is aBaseCollection
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
-> AddedChannel.rtcRegion
(for voice channels) -
Updated
Invite
-> MadeInvite.channel
type always available -
Updated
Message
-> MadeMessage._reactions
andMessage._stickers
not enumerable -
Update
Role
-> AddRole.editPosition(number, {reason})
0.11.1
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 onlyUSERS_UPDATE
is being listened to
-> Don't checkhasDifference
based off activity id since it could becustom
orspotify:1
which won't make it unique
0.11.0
-
Changed CommandCluster options to default
useClusterClient
astrue
. -
Changed file uploading keys
->name
renamed tokey
anddata
renamed tovalue
.
->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
andguildMembersChunk.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 newRole.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
toCommandClient
andtriggerTypingAfter
toCommand
->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
-> Fixmessage.convertMessage()
ignoring an empty string for text
-> Allow ability to usearg.default
for the main command argument, meaningCommand.default
now is settable