Releases: DinographicPixels/TouchGuild
v1.4.1
Patch note:
General
- Adding components to Messages (Message component support)
- REST requests failing due to additional "/" in the request path leading to request failure.
- ComponentInteraction#editParent: Add alternative REST execution if not cached
Contributors:
- Wade (@pakkographic)
v1.4.0
✨ What's new?
We're thrilled to announce developers brand new tools that will keep making their apps, easier to use, intuitive, and make them more productive while making them focus on what matters the most. This change log surely doesn't list everything, but it lists the most important changes that we've made in a simple way.
Major changes:
- Application Commands: a brand new way to interact.
- Command registering including different scopes (global, guild, user) and their bulk equivalent.
- A wide variety of command option types: string, integer, float, number, signed 32bit integer, user, role, channel, embedded attachment, boolean, emote, all of them making the options safe to utilize (type being verified internally).
- Standardized Slash Commands, no more prefix annoyance for users! Set an application short name, defining how you'll execute your commands.
- Introducing Reply Commands, simpler, intuitive, making the process of executing commands seamless by removing the application short name when replying to the sele
cted app. - and. way. more..
- Gateway Intents (layer)
- Message components (including button support natively integrated, working using Command Interactions)
- Data collection, a way for us to improve the library far beyond the limits, to opt out, request data removal, or see what we collect, learn more.
Learn more about Application Commands.
Learn more about components.
Additions:
General
Modifications:
General
- Updated dependencies.
Contributors:
- Wade (@pakkographic)
1.3.0
✨ What's new?
Major changes
- Message behavior, introducing acknowledgement & followups.
Messages created with a Message component are no longer independent and are replying to specific messages defined thanks to Message Originals, making things smoother, and more intuitive. - Message Originals: Message#isOriginal, getOriginal, deleteOriginal, getOriginals, originals, making huge behavior changes to Original methods. Learn more.
- Client REST methods listed as DEPRECATED (these methods are going to be removed on the next update), making a difference between cache methods and REST methods that are already available under Client#rest and are well organized for you.
- Message#attachmentURLs, enabling you to get an array of embedded content attached to the message
- Message#getAttachments, get an array of
MessageAttachment
including a wide range of information on embedded content attached to the message. - Caching app-created messages, making Message Originals work with sent messages using REST, and make you able to retrieve data that may be useful to you.
- Webhook execution support.
- Typing provider library partially using OpenAPI for more accurate and up-to-date typings.
- Bringing more consistency in type interfaces, and more.
- Renamed a bunch of structure classes such as GuildCategory, GuildRole, etc..
- Ported TouchGuild to TypeScript 5.0+
Resolved issues:
- Cannot remove user reactions (missing query)
- Client#editMessage replica
newMessage
property having typeobject
instead ofEditMessageOptions
- Message Constructor having
params?
property set to{ originalMessageID?: string | null; }
instead ofMessageConstructorParams
- EditMessageOptions:
replyMessageIds
,isSilent
,isPrivate
properties being present, however cannot be set. - Message#edit having a custom type instead of globalized
EditMessageOptions
. - Web socket reconnection attempt variable:
currReconnectAttempt
being reset at each attempt. - Session not being invalidated appropriately.
- AppUser (previously UserClient) undefined on "ready" event trigger (Client#user).
- REST/Channels#editMessage
params
property having typeobject
instead ofMessageConstructorParams
. - REST/Channels#getMessage
params
property having typeobject
instead ofMessageConstructorParams
. - Fixed REST route usage not working properly and being ignored.
- Fixed typing issues after updating the typing provider library.
Additions
General
- Add REST Mode, enabling you to perform requests without connecting to the gateway.
- Add
targetUserID?: "@me" | string
parameter to REST/Channels#deleteReaction, so you can target which user to remove the reaction from. - Add
MessageConstructorParams
, locating a wide range of Constructor parameters, including Originals. - Add the ability to set if the Web socket has to reconnect on connection loss or not using
wsReconnect
on Client constructor initialization. - Add type interface
MessageAttachment
- Add
deprecations
type into Client constructor parameters, making you able to revert to previous behaviors (independentMessageBehavior
), we do not recommend it, as it'll be removed sooner or later. - Grouping typings into an index.
- Ignore /lib path to make the library even more lightweight while maintaining TypeScript/JavaScript: CommonJS, ES compatibility.
Message
- createFollowup (can only be used if the message has been acknowledged),
- createMessage behavior, cannot be used after message is acknowledged.
- isOriginal, a property that is either set to "trigger", "response" or
false
. - acknowledged property
- getOriginal, deleteOriginal & getOriginals completing the Original methods.
- editFollowup, deleteFollowup
- Changed Message#bot -> app
- attachmentURLs – Get an Array of embedded attachment URLs
- getAttachments – Get an Array of
MessageAtachment
- Embeds are having more consistent types! Utility tools such as embedsToParsed and embedsToRaw have been added internally to enable this.
Webhook
- executeWebhook
- requestToken – Request the Webhook token if not defined, sets it automatically and returns the value.
- REST/Webhooks dedicated to Webhook methods such as create, edit, delete and execute.
WebhookExecuteOptions
,WebhookMessageDetails
type interfaces.
Modifications
General
- Methods are now sorted in alphabetically (internally).
- Removed: calendarEventComment.d.ts
- Removed: channel.d.ts
- Removed: doc.d.ts
- Removed: docComment.d.ts
- Removed: forumThread.d.ts
- Removed: calendarEvent.d.tss
- Improved JSDocs
- Each API types are having their Raw version for consistency.
- Renamed GuildSubscription to Subscription
- Renamed GuildRole to Role
- Renamed GuildGroup to Group
- Renamed GuildCategory to Category
- Renamed CalendarEventComment to CalendarComment
- UserTypes: app, user instead of bot, user. (added RawUserTypes as well)
- webhookCreate (REST/Guilds) -> create (REST/Webhooks)
- webhookEdit (REST/Guilds) -> edit (REST/Webhooks)
- webhookDelete (REST/Guilds) -> delete (REST/Webhooks)
- Moved editChannel & deleteChannel to REST/Channels and renamed them edit and delete.
- UserClient -> AppUser
- Renamed
MessageEmbedOptions
toEmbed
as opposed toRawEmbed
- Message#replyMessageIds -> replyMessageIDs
- Message#hiddenLinkPreviewUrls -> hiddenLinkPreviewURLs
Typings (consistency)
- RawChannel
- RawAnnouncement
- RawAnnouncementComment
- RawAnnouncementCommentReaction
- RawCalendarEvent
- RawCalendarRSVP
- RawCalendarComment
- RawCalendarCommentReaction
- CalendarRSVPStatus
- RawMessage
- RawForumThread
- RawPartialForumThread
- RawForumThreadReaction
- RawForumThreadComment
- RawForumThreadCommentReaction
- RawDoc
- RawDocComment
- RawDocCommentReaction
- RawListItem
- RawPartialListItem
- RawListItemNote
- RawPartialListItemNote
- RawGuild
- RawGroup
- RawCategory
- RawMember
- RawMemberBan
- RawPartialMember
- RawRole
- RawSubscription
- RawUser
- RawPartialUser
- RawAppUser
- RawEmbed
- RawMentions
- RawEmote
- RawSocialLink
and way more..
Contributors:
- Wade (@pakkographic)
Full Changelog: 1.2.5...1.3.0
v1.2.5
✨ What's new?
Resolved issues
WSManager#latency
incorrect value- The
setMemberXP
method, not working properly. - TouchGuild instance crashes when deleting a message from a stream and voice channel (reported by Brunch).
- Cannot import the following class structures:
GuildCategory
,GuildSubscription
,Permission
,Announcement
,AnnouncementChannel
,AnnouncementComment
,AnnouncementReactionInfo
- No event is emitted when RSVP Updates are sent in bulk.
- Potential crash when deleting message due to unknown channel type.
Additions
General
- Integrating the official markdown header by default when connecting and performing requests.
- Added to each file a 'credits' header.
- Notify developer when using the Client
connect
method if the version of TouchGuild is no longer the latest version (works for stable & dev), so you can update! (can be disabled when constructing the Client:updateWarning
property) - When running a development build of TouchGuild, when using the Client
connect
method, the current build that you're running is shown. - A message when connecting TouchGuild using a copy/fork version is shown.
- If the
gapi_
part of the token is not present, it is added automatically. - Added missing exports (
GuildCategory
,GuildSubscription
,Permission
,Announcement
,AnnouncementChannel
,AnnouncementComment
,AnnouncementReactionInfo
) X-Library-Details
header in addition toUser-Agent
Client
- The guild member count has been added as a parameter of the
guildMemberAdd
event. - New constructor property inside the options object:
isOfficialMarkdownEnabled
, enabling developers to set the official markdown header to false if needed.
REST/Guilds
getMemberRoles
, allowing you to retrieve a list of roles assigned to a specific guild member.
REST/Misc
- Added
signURL
raw method. This method is used to create a URL Signature from a Guilded CDN URL, making you able to store the content returned within 5 minutes, as the signed URL will expire. This is a RAW method, meaning that the returned content isn't treated by TouchGuild, we let you take care of this, we're not supporting this decision due to the limitations it imposes. (More details about the request on the Guilded API Documentation website).
Endpoints
- Added
URL_SIGNATURES
to endpoint list.
Guild
- Added
awardMember
,setMemberXP
,awardRole
, shortcut/convenient methods.
Modifications
General
- Improved JSDocs overall.
- Improved coding style, making it more readable.
- Updated
GuildedAPI-Types.ts
tov0.3.45
. - Updated dependencies to the latest version.
REST/Guilds
- Changed
setMemberXP
method fromPOST
toPUT
, making the request work properly.
Gateway events
- Removed duplicate internal gateway event processing method:
calendarRsvpManyUpdated
fromCalendarHandler
, replacing it withcalendarRsvpBulkUpdate
.
Channel
stream
channels now returns aTextChannel
instead of aGuildChannel
, this resolves the crash issue.voice
channels now returns aTextChannel
instead of aGuildChannel
, this resolves the crash issue.
Contributors:
Developers
- Wade (@pakkographic)
- Raphaël (@raphckrman)
Bug Reports:
- Brunch
View changelogs
v1.2.4
✨ What's new?
- Added guildMemberCount to the guildMemberAdd event
- Updated endpoints
- Fixed many comments
The REST#Channels methods below have been replaced by : createPermission
, editPermission
, deletePermission
, getPermission
.
getPermissions
, getUserPermissions
, getRolePermissions
createChannelRolePermission
, getChannelRolePermission
, getChannelRolesPermission
, editChannelRolePermission
, deleteChannelRolePermission
, createChannelUserPermission
, getChannelUserPermission
, getChannelUsersPermission
, editChannelUserPermission
, deleteChannelUserPermission
, createChannelCategoryRolePermission
, getChannelCategoryRolePermission
, getChannelCategoryRolesPermission
, editChannelCategoryRolePermission
, deleteChannelCategoryRolePermission
, createChannelCategoryUserPermission
, getChannelCategoryUserPermission
, getChannelCategoryUsersPermission
, editChannelCategoryUserPermission
, deleteChannelCategoryUserPermission
-
The REST Guilds#updatePermission method has been renamed editPermission
-
The REST Guilds#updateRolePermission method has been renamed editRolePermission
-
The following methods have been added to REST#Guilds:
createCategoryPermission
,editCategoryPermission
,getCategoryPermission
,getCategoryPermissions
,getCategoryUserPermissions
,getCategoryRolePermissions
,deleteCategoryPermission
-
Removed unnecessary structures:
ChannelCategoryRolePermission.ts
,ChannelCategoryUserPermission.ts
,ChannelRolePermission.ts
,ChannelUserPermission.ts
-
Added Client#getMemberPermission method
-
Added Client#editGuildRolePermission method
-
Added new Guilds & Channels structures' methods to Client for easier access.
-
Changed some properties name according for more coherence across the library.
-
Updated GuildCategory shortcut methods
-
Updated GuildRole's position property to access the correct data as Guilded updated the name of the property to priority.
-
Added the Permission class to structures.
-
Fixed TextChannel shortcut methods.
-
Removed
JSONChannelUserPermission
,JSONChannelRolePermission
,JSONChannelCategoryRolePermission
,JSONChannelCategoryUserPermission
-
Added: JSONPermission
-
Updated JSONGuildCategory
-
Updated GuildedAPI-Types.ts
Full Changelog: 1.2.3...1.2.4
v1.2.3
✨ What's new?
- Added new methods (and their shortcuts):
REST#channels: archiveChannel, restoreChannel, pinMessage, unpinMessage
REST#guilds: getSubscriptions, getSubscription, getMemberPermission, updateRolePermission
& Added those methods to the client class. - Added "visibility" property to GuildChannel
- Fixed GuildedChannel's isPublic property to work even if Guilded deprecated it
- Added "botUserID" property to GuildRole which is "The bot user ID the role has been defined for".
- Added new structure class: GuildSubscription
- Updated JSON versions of edited classes.
- Added new endpoints.
- Updated Guilded API Types (guildedapi-types.ts)
- Add events: userStatusCreate, userStatusDelete, guildGroupCreate, guildGroupUpdate, guildGroupDelete
- New class: GuildRole
- New class: GuildGroup
- New types: UserStatus, UserStatusDelete, UserStatusCreate, JSONGuildRole, JSONGuildGroup
- Add "groups" cache in Guild.
- Guilds the bot is in, are now directly cached on starting.
- New methods: rest.misc#updateUserStatus, rest.misc#updateUserStatus, rest.guilds#getRoles, rest.guilds#getRole
- Updated endpoints.
- User event handler has been created, for internal use.
- Updated guildedapi-types.ts
- Create, edit, delete, get, announcements
- Create, edit, delete, get, announcement comments
- Add/remove reaction from announcements
- Add/remove reaction from announcement comments
- Cache support for those new changes.
- New events: "announcementCreate", "announcementUpdate", "announcementDelete", "announcementCommentCreate", "announcementCommentUpdate", "announcementCommentDelete"
- edit, delete, createAnnouncement, createReaction, deleteReaction methods are added to Announcement
- edit, delete, createComment, createReaction, deleteReaction methods are added to AnnouncementComment
- Fixing client#deleteReaction naming issue. (was removeReaction)
- Get user guilds (API allows
@me
only, for now
✨ Thanks to @raphckrman for his contribution to the project.
- Full Changelog (diff): 1.2.2...1.2.3
1.2.2
Changelogs: https://touchguild.com/updates/1.2.2
Introducing v1.2.2 video: https://www.youtube.com/watch?v=xJ9RDc-kZEY
1.2.1
- Support reaction added or removed from forum thread.
- Remove identifiers verification layer for gateway events.
- Add new verification layer for gateway events.
- Remove WSManager#identifiers
- Remove Client#identifiers
- Add ForumThreadReactionInfo#threadID
- Add ForumThreadReactionInfo#commentID
- Add ForumThreadReactionInfo#type
- Add MessageReactionInfo#messageID
- Add MessageReactionInfo#type
- Add ReactionInfo#channelID
- Add ReactionInfo#reactorID
- ReactionInfo#data -> ReactionInfo#raw
1.2.0
- Add guild to cache when receiving any event containing guild id.
- Add channel to cache when receiving any event containing a channel id.
- Add cache hierarchy (e.g: guild/channels/messages/message)
- Remove Client#cache, cache isn't entirely managed in Client anymore.
- Channel filters by channel types.
- Add
GuildChannel
,TextChannel
,DocChannel
,ForumChannel
,GuildChannel
,CalendarChannel
. - Add
Base#toJSON
,ListItem#toJSON
,Webhook#toJSON
,UserClient#toJSON
,Guild#toJSON
,Member#toJSON
,User#toJSON
,ForumThread#toJSON
,BannedMember#toJSON
,CalendarEventRSVP#toJSON
,CalendarEvent#toJSON
,CalendarChannel#toJSON
,DocChannel#toJSON
,ForumChannel#toJSON
,TextChannel#toJSON
,GuildChannel#toJSON
,Channel#toJSON
,Doc#toJSON
,ForumThreadComment#toJSON
,Message#toJSON
- Add AnyTextableChannel, AnyChannel, AnyGuildChannel typings.
- Add Client params:
collectionLimits
to configure cache. - Update imports.
- Edit every handlers to match new caching system.
- Update REST methods to match new caching system & new components.
- Add update methods to every components for data update when receiving new data.
- Add
Client#guilds
- Add
Client#users
- Add
Client#util
- Add
Client#startTime
- Add
Client#uptime
- Update
Client#getMember
, not sending rest request anymore. - Update
Client#getMembers
not sending rest request anymore. - Update
Client#getGuild
not sending rest request anymore. - Update
Client#getMessage
not sending rest request anymore. - Update
Client#getMessages
not sending rest request anymore. - Update Doc#member, ForumThreadComment#member, Guild#owner, ListItem#member, Member#user, MemberUpdateInfo#oldRoles, Message#member
- Add
Guild#getMember
- Add
Guild#verified
- Add
Guild#channels
- Add
Guild#members
- Add
oldChannel
to channelUpdate event - Message#editLastMessage -> Message#editLast
- Message#deleteLastMessage -> Message#deleteLast
- Message#editOriginalMessage -> Message#editOriginal
- Message#deleteOriginalMessage -> Message#deleteOriginal
1.1.0
- Added
guildDelete
event. - Added
GuildDeleteInfo
typings. - Added
ForumTopicComment.mentions
property. - Converted some WSManager
Error
toGatewayError
- Fixed & added some comments.
- Updated dependencies.
- messageDelete event
message
parameter has changed fromMessage
toPossiblyUncachedMessage
. - messageUpdate event now includes oldMessage.
- Removed
Message.oldContent
- Adding support for data compression (cannot be used as it isn't supported by guilded)
- Updated WSManager
- Added
RawPacket
&WelcomePacket
typings. - Updated WSEvents.
- Moved WSEvents from
types/wsevents.d.ts
totypes/events.d.ts
- Add
Client#getMembers
- Add
Client#getBan
- Add
Client#getBans
- Add
Client#editMember
- Add
Client#removeMember
- Add
Client#createBan
- Add
Member#ban
- Add
Member#unban
- Add
Member#kick
- Add
Member#edit
- Add
EditMemberOptions
- Add
Guild#createBan
- Add
Guild#removeBan