Skip to content

Releases: Kirollos/Oxide.Ext.Discord

v2.1.6

25 Aug 14:40
7058b14
Compare
Choose a tag to compare

What's Changed

  • Fixed broken SelectMenu interactions by @philipodev in #50
  • Fixed RateLimitHandler using milliseconds instead of seconds
  • Fixed OnDiscordGuildMemberRemoved passing the wrong member parameter
  • Fix Retry after using int when it's a float causing errors during rate limiting
  • Update Discord Token Validator again...

New Contributors

Full Changelog: 2.1.5...2.1.6

v2.1.5

13 Jul 12:26
Compare
Choose a tag to compare
  • Fix TLS Security Issue
  • Updated Token Validator for new format

v2.1.3

13 Jul 01:19
661b3c1
Compare
Choose a tag to compare
  • Fix spamming issue

Build 2.1.2

27 Jan 13:20
eb33f6a
Compare
Choose a tag to compare

Fix Interaction Exception when sending a valid Ephemeral message

Build 2.1.1

26 Jan 14:26
c1bd7b8
Compare
Choose a tag to compare

** Discord Extension 2.1.1 Patch Notes**

  • Fixes

    • Fixed MessageComponentType.InputText enum having wrong value
    • SocketCommandHandler sending commands before identifying
  • Added

    • Validation for API endpoints and builders
    • InputTextComponent missing fields
    • Snowflake validation for API requests
    • CreateTimestamp Field to ThreadMetadata
    • List Stickets Field to GuildPreview
    • MessageFlags Field to MessageCreate
    • Locale/Guild Locale Fields to DiscordInteraction
    • UserOixideLocale / GuildOxideLocale Fields to InteractionDataParsed
    • Many Exceptions for validation failures
    • Discord <-> Oxide locale converter
  • Changes

    • PrivacyLevel.Public has been deprecated by discord
    • MessagesFlags removed from CommandFollowupCreate since it's now on MessageCreate

Build 2.1.0

05 Jan 18:55
2538510
Compare
Choose a tag to compare

** Discord Extension 2.1.0 Patch Notes**

  • Fixes

    • Improved Discord Config Loading / Error Handling
    • Some errors in the documentation
    • Incorrect JSONPropery for NsfwLevel (nsfw -> nsfw_level)
    • JSON error being thrown for valid DiscordColor type
    • REST plugin callbacks being called from the wrong thread
    • Websocket errors during message thread updates
  • Added

    • Guild Scheduled Events Entities / API's / Events
    • AutoComplete Slash Command Option
    • Min/Max Value for Slash Command Option
    • Input Component
    • Bot Token Validator that warns if we believe the token is not valid
    • New ActivityFlags PartyPrivacyFriends/PartyPrivacyVoiceChannel/Embedded
    • New ApplicationFlags GatewayMessageContent/GatewayMessageContentLimited]
    • Added MessageCreate Validation to ensure a valid message is being sent to discord. Helps with tracking plugins that create invalid discord messages
    • DiscordChannel.GetThreadMember API Call
    • GatewayIntents.GuildScheduledEvents Field
    • DiscordGuild.PremiumProgressBarEnabled Field
    • DiscordGuild.ModifyCurrentMember API Call
    • GuildMember.Avatar Field
    • GuildMember.CommunicationDisabledUntil Field
    • GuildMemberUpdate.CommunicationDisabledUntil Field
    • SystemChannelFlags SuppressGuildReminderNotifications/SuppressJoinNotificationReplies Values
    • InteractionResponseType Enum ApplicationCommandAutocompleteResult/Modal Values
    • InteractionType Enum ApplicationCommandAutocomplete/ModalSubmit Values
    • InputTextStyles Enum
    • MessageComponentType.InputText Value
    • MessageAttachment Description/ContentType/Ephemeral Fields
    • MessageCreate.AddAttachment Method
    • DiscordRole Fields Icon/UnicodeEmoji/RoleIcon
    • PermissionFlags CreatePublicThreads/SendMessagesInThreads/ModerateMembers Values
    • DiscordWebhook.GetWebhookMessage API Call
    • DiscordCdn.GetGuildMemberAvatar Method
    • DiscordCdn.GetRoleIcon Method
    • Websocket now has a rate limit handler
    • DispatchCode Enum GuildScheduledEventCreate/GuildScheduledEventUpdate/GuildScheduledEventDelete/GuildScheduledEventUserAdd/GuildScheduledEventUserRemove Values
  • Changes

    • ThreadCreate.AutoArchiveDuration is now nullable
    • DiscordGuild.ModifyCurrentUsersNick is now Obsolete
    • GuildFeatures Enum Updated to Match Discord Changes
    • DiscordInvite.GetInvite now supports InviteLookup argument
    • DiscordStickerPack.BannerAssetId is now nullable
    • UserFlags Enum Updated to match Discord Names. Old names are now marked obsolete
    • VoiceRegion.Vip marked Obsolete
    • Split Rest RateLimit Handler into a base class for both Rest/Websocket to use.
    • Initial Websocket heartbeat is sent after a random interval between 0 and heartbeat interval
    • Socket._socket is locked when making changes to it to prevent multiple from being created
    • SocketCloseCodes AuthenticationFailed/InvalidShard/ShardingRequired/InvalidApiVersion/InvalidIntents/DisallowedIntent will no longer cause the bot to loop with errors

Build 2.0.2

17 Sep 16:24
d04a405
Compare
Choose a tag to compare

** Discord Extension 2.0.2 Patch Notes**

  • Fixes

    • Fixed outdated DiscordLink example in plugin example docs
    • Fixed DiscordColor creating the wrong color due to incorrect bit shifting
    • Fixed bug with DiscordCommands & DiscordSubscriptions running multiple times if multiple bots were used
    • Fixed SocketClose code parsing not working correctly and not displaying the correct close reason.
    • Fixed error in DiscordColorConverter for nullable DiscordColor types
  • Added

    • Added more color options to DiscordEmbedBuilder- Added timestamp options to DiscordEmbedBuilder
    • Added Version Field to ApplicationCommand
    • Added DiscordColor byte constructor
    • Added HasArg check for IntegrationDataParsed Args
    • Added new permission StartEmbeddedActivities - Allows for launching activities (applications with the EMBEDDED flag) in a voice channel
    • Added ChannelTypes list to CommandOption
  • Removed

    • Removed EnumTryParse method as no longer needed.
    • Removed Deprecated Guild.Region field
  • Changes

    • Changed DiscordHooks -> DiscordExtHooks due to plugin name conflict / issues. DiscordHooks still exists and is marked obsolete.
    • Changed ApplicationCommandBuilder to remove usages.
    • Changed ApplicationId as nullable in DiscordMessage
    • Improved GuildMember.DisplayName
    • Changed DiscordSubscriptions to be more performant during Discord Message Create
    • Exposed Request.UrlBase & Request.ApiVersion as public so plugins can also use it.
    • Default CommandGroup and SubCommand in IntegrationDataParsed as empty strings

Build 2.0.1

03 Sep 21:27
8e155dc
Compare
Choose a tag to compare
  • Added Builders to multiple types

    • ApplicationCommandBuilder
    • MessageComponentBuilder
    • DiscordEmbedBuilder
  • Added IntegrationParser that can parse Integration events to make them easier to process

  • Added ContextMenuCommand = 23 MessageType enum

  • Added more constructors for DiscordColor

  • DiscordLink can now support multiple link plugins

  • Guild Voice states now update from socket events

  • Removed ApplicationCommandCreated/Updated/Deleted Gateway events / hooks. Bots will never receive these events.

  • Changed DiscordLink now calls hook on all plugins not just registered ones

  • Changed Bot -> BotUser in BotClient

  • Changed LogLevel -> DiscordLogLevel to avoid naming conflicts

  • Fixed multiple issues with application commands and interaction events

  • Fixed Gateway disconnecting when sending an updated bot presence that didn't use all the fields.

  • Fixed not being able to specify null for parent id in ChannelCreate

  • Fixed MessageType enum having incorrect values

  • Fixed channel id not being nullable in VoiceState

2.0.0 Patch Notes

Overview of Changes:

  • Single Websocket Per Bot Token: If multiple plugins are using the same bot token then those plugins will be grouped together for websocket and REST calls.
    This means that reloading your plugin will no longer reset the websocket.
    I'm hoping with this update to solve the connection issues but if you're still not trusting of it there are methods available to disconnect and reconnect the web socket.

  • Discord API V9: Currently the discord extension V1 uses Discord API V6.
    This version has been deprecated and will stop working in the future.
    V9 is the latest version and will be constantly updated for any API changes.

  • Gateway Intents: Switching to API >= V8 requires us to use Gateway Intents.
    These intents are to be specified when connecting and let Discord know which socket events your bot wants to listen for. I recommend only specifying the intents that you need. I will have documentation indicating what each intent will give you. If you have multiple plugins sharing a bot token and requires new intents not previously requested then the bot will disconnect and reconnect to the web socket with the updated intents. This switch will help with performance because we aren't receiving events we don't care about anymore.

  • REST Error Callback: Sometimes REST calls fail and there is no way to know if that has happened in the current version.
    With the new version, you have the option to listen for errors on all REST calls.

  • Hook Overhaul: Hooks have been changed and renamed to better fit oxide naming conventions.
    Hooks have been split up so that hooks relating to Direct Messages / Guilds have a separate hook for each. For example OnDiscordDirectMessageCreated and OnDiscordGuildMessageCreated. Where possible Channel and Guild objects have been added to hook calls.

  • Performance: Performance is one of the biggest concerns people have had with Discord Extension V1.
    While these issues wouldn't be noticed in smaller discord servers they would appear in servers with a large number of users.
    There were multiple issues that combined together made things worse which have been solved in V2. Here are some of the changes that have been made to improve performance.

    • Combining all bots using that use the same discord token to use a single websocket connection and not per plugin.
      This will prevent the server from performing the same work multiple times.
    • All lists of discord entities have been replaced with Hash's instead.
      This fixes having to loop over every Guild Member to find the discord user you were looking for.
    • Gateway intents were added in Discord API v8. This will require each plugin to specify which Discord gateway event a plugin want's to listen to.
      Discord will only send those discord events over the websocket which improves performance for us as well.
    • There are many more changes that aren't as impactful as these as well.

New Features:

  • Added the ability for plugins to upload files to discord during message create / update
  • Added support for Discord Message Components Learn More
  • Added support for Discord Slash Commands Learn More
  • Added a universal linking API provided by DiscordLink. This allows plugins that use DiscordLink to use any discord link plugin they wish and not have to worry about compatibility.
  • Added the ability for plugins to register commands in discord similar to how it's done in oxide DiscordCommand
  • Added the ability for plugins to register to DiscordMessages in specific channels using DiscordSubscriptions
  • Replaced using strings for Discord ID's with Snowflake. Snowflake is backwards compatible with using string and only the type needs to be changed.

Build 2.0.0

23 Aug 19:44
e8c4af1
Compare
Choose a tag to compare

Major Changes

Overview of Changes:

  • Single Websocket Per Bot Token: If multiple plugins are using the same bot token then those plugins will be grouped together for websocket and REST calls.
    This means that reloading your plugin will no longer reset the websocket.
    I'm hoping with this update to solve the connection issues but if you're still not trusting of it there are methods available to disconnect and reconnect the web socket.

  • Discord API V9: Currently the discord extension V1 uses Discord API V6.
    This version has been deprecated and will stop working in the future.
    V9 is the latest version and will be constantly updated for any API changes.

  • Gateway Intents: Switching to API >= V8 requires us to use Gateway Intents.
    These intents are to be specified when connecting and let Discord know which socket events your bot wants to listen for. I recommend only specifying the intents that you need. I will have documentation indicating what each intent will give you. If you have multiple plugins sharing a bot token and requires new intents not previously requested then the bot will disconnect and reconnect to the web socket with the updated intents. This switch will help with performance because we aren't receiving events we don't care about anymore.

  • REST Error Callback: Sometimes REST calls fail and there is no way to know if that has happened in the current version.
    With the new version, you have the option to listen for errors on all REST calls.

  • Hook Overhaul: Hooks have been changed and renamed to better fit oxide naming conventions.
    Hooks have been split up so that hooks relating to Direct Messages / Guilds have a separate hook for each. For example OnDiscordDirectMessageCreated and OnDiscordGuildMessageCreated. Where possible Channel and Guild objects have been added to hook calls.

  • Performance: Performance is one of the biggest concerns people have had with Discord Extension V1.
    While these issues wouldn't be noticed in smaller discord servers they would appear in servers with a large number of users.
    There were multiple issues that combined together made things worse which have been solved in V2. Here are some of the changes that have been made to improve performance.

    • Combining all bots using that use the same discord token to use a single websocket connection and not per plugin.
      This will prevent the server from performing the same work multiple times.
    • All lists of discord entities have been replaced with Hash's instead.
      This fixes having to loop over every Guild Member to find the discord user you were looking for.
    • Gateway intents were added in Discord API v8. This will require each plugin to specify which Discord gateway event a plugin want's to listen to.
      Discord will only send those discord events over the websocket which improves performance for us as well.
    • There are many more changes that aren't as impactful as these as well.

New Features:

  • Added the ability for plugins to upload files to discord during message create / update
  • Added support for Discord Message Components Learn More
  • Added support for Discord Slash Commands Learn More
  • Added a universal linking API provided by DiscordLink. This allows plugins that use DiscordLink to use any discord link plugin they wish and not have to worry about compatibility.
  • Added the ability for plugins to register commands in discord similar to how it's done in oxide DiscordCommand
  • Added the ability for plugins to register to DiscordMessages in specific channels using DiscordSubscriptions
  • Replaced using strings for Discord ID's with Snowflake. Snowflake is backwards compatible with using string and only the type needs to be changed.

Build 1.0.9

14 Feb 13:37
8af8b57
Compare
Choose a tag to compare
  • Fix discord close code parsing not working correctly