Skip to content

DiscordGo v0.24.0

Compare
Choose a tag to compare
@FedorLap2006 FedorLap2006 released this 02 Mar 19:42
· 164 commits to master since this release
45e625d

Hang tight, this one is the biggest yet

Important notice

From this release forward, DiscordGo will require Go 1.13+ to run.

Breaking changes of master

Since v.0.23.0 we've been recommending everyone to use @master version for slash commands, context menus and other new stuff.

This led to a big problem with versioning and breaking changes, because some of the features weren't implemented fully, had some problems didn't properly function or didn't fully reflect the API, and so there was a number of breaking changes since the base feature PRs:

  • Some of InteractionResponseTypes were removed. #930
  • InteractionResponseACKWithSource was renamed to InteractionResponseDeferredChannelMessageWithSource. #930
  • Type of MinValues in SelectMenu was changed to *float64, to allow for the default values when field isn't set. #1026
  • InteractionApplicationCommandResponseData has been renamed to InteractionResponseData. #933
  • ButtonEmoji was renamed to ComponentEmoji. #954
  • ApplicationCommandInteractionData has been removed, use Interaction.ApplicationCommandData() instead. #954
  • MessageTypeApplicationCommand was replaced by MessageTypeChatInputCommand. #978

API version v9

Now DiscordGo uses API v9! Due to this fact this release includes a couple of breaking changes regarding the API:

Breaking changes

  • User account login, endpoints and methods were dropped. #1087
  • Embed now is replaced with Embeds in MessageSend and MessageEdit. #1000
  • EndpointApplications no longer points to OAuth2 applications. Use EndpointOAuth2Applications for that instead. #856
  • TargetUserType field in Invite and TargetUserType type are renamed to TargetType. Additionally all the constants named InviteTargetUserType<Name> were renamed to InviteTarget<Name>. See #1105 for more info
  • RedirectURIs were removed from Application
  • All user flags now use UserFlag type instead of int. #937
  • REST API functions now will now return wrapped version of ErrJSONUnmarshal. For error check errors.Is or errors.Unwrap should be used. #924
  • ErrCodeMaximumFriendsReached and ErrCodeNoteTooLong error codes were removed. #1096

New features

  • Guild preview #818
  • Slash commands #856
  • Constraints for slash command number options #1026
  • Button component #933
  • Selects component #954
  • Context menus #978
  • Ephemeral attachments #1008
  • Slash commands options auto completion #1014
  • Guild member timeouts #1061
  • Interaction locale #1073
  • Stickers #1057
  • Modals #1049
  • Application commands: attachment option #1088
  • Threads #1058
  • Guild stickers #1095
  • Guild Templates #1091
  • Guild Member avatars #1077
  • Guild Scheduled Events #1032
  • InviteCreate and InviteDelete events #1105
  • User banners and accent colors #1117

Bug fixes

  • EndpointInvite now points to correct API endpoint #892
  • RTP extended header is now parsed correctly #880

Other changes

  • Addition of Required flag for resp-type option of /responses command in slash commands example #886
  • Missing permission constants #906
  • Addition of missing fields to Activity and GetCustomEmojis to Message #895
  • Addition of Permissions field to Member #902
  • github.com/gorilla/websocket was bumped to 1.4.2 #896
  • Correction of slash commands example spelling & grammar #905
  • Fix of some typos detected by goreportcard #925
  • Addition of ApplicationCommandOptionMentionable #918
  • Bulk application command overwrite endpoint #926
  • Wrapping of ErrJSONUnmarshal to include error message #924
  • Addition of ping pong example for direct messages #882
  • Addition of ApplicationCommandInteractionDataResolved #919
  • Fix of UserFlags constants types #937
  • Webhook message endpoint #948
  • Support of attachments in webhooks and interaction responses #931
  • Addition of SessionStartLimit field to GatewayBotResponse #949
  • Addition of BeforeDelete field to GuildDelete #962
  • Addition of ActivityTypeCompeting #990
  • Addition of ActivityTypeWatching #983
  • Channel type restrictions for ApplicationCommandOption #1015
  • Fix of some links and wording in the docs #1010
  • Addition of Guild.BannerURL method #1023
  • Addition of Member to MessageReactionAdd #1042
  • Missing MessageFlags values #1089
  • Missing audit log keys and actions #1098
  • Missing JSON error codes #1096
  • Missing intents #1097
  • Addition of DefaultPermission field to ApplicationCommand #1071
  • Addition of Disabled field to SelectMenu #1102
  • Implementation of removal procedure for slash commands example #1103
  • Addition of Interaction field to Message #1112

Special thanks

Full Changelog: v0.23.2...v0.24.0