Skip to content

Releases: bwmarrin/discordgo

DiscordGo v0.26.1

29 Aug 15:17
fea3d77
Compare
Choose a tag to compare

Hi all! This release only bumps semantic version of the library and does not contain any new fixes nor features.
This is due to our semantic version previously not matching the actual library version.

DiscordGo v0.26.0

17 Aug 17:54
622a7d8
Compare
Choose a tag to compare

Get ready! This release is not so big, but is packed with refactoring changes and fixes.

What's Changed

Notices / Breaking changes

  • DefaultPermission has been deprecated in favor of DefaultMemberPermissions and DMPermission in ApplicationCommand #1075
  • ApplicationCommandPermissionsBatchEdit has been deprecated #1075
  • Content, Components and Embeds were made pointers in WebhookEdit #1174
  • GuildTemplate.Description was made a pointer #1191
  • Type of GuildTemplate.UsageCount was changed to int #1191
  • GuildChannel and PrivateChannel were removed due to deprecation #1203
  • InviteTargetEmbeddedAppliction was renamed to InviteTargetEmbeddedApplication #1211
  • NSFW, Archived, Locked and Invitable were made pointers in ChannelEdit #1199
  • Type of Features was changed to []GuildFeature in UserGuild #1223
  • Remaining undocumented structs, events and fields were removed. #1225
  • ChannelEdit now shares same functional and parameters as ChannelEditComplex #1217
  • GuildMemberEdit now shares same functional and parameters as GuildMemberEditComplex #1217
  • ChannelEditComplex was deprecated in favor of ChannelEdit #1217
  • GuildMemberEditComplex was deprecated in favor of GuildMemberEdit #1217
  • name and roles parameters of GuildEmojiEdit and GuildEmojiCreate were placed into a EmojiParams struct #1217
  • accessToken, nick, roles, mute and deaf parameters of GuildMemberAdd were placed in a GuildMemberAddParams struct #1217
  • name, color, hoist, perms and mention parameters of GuildRoleEdit were placed into a GuildRoleParams struct #1217
  • name and description parameters of GuildTemplateCreate and GuildTemplateEdit were placed into a GuildTemplateParams struct #1217
  • GuildEmbedEdit now accepts parameters through GuildEmbed struct #1217
  • GuildEmbed.Enabled was made a pointer #1217
  • GuildRoleCreate now accepts initial role parameters through GuildRoleParams struct #1217
  • g parameter of GuildEdit was made a pointer, to match other REST methods #1228

New features

  • Application commands: Permissions v2 #1075
  • Auto moderation #1201
  • Application command options: min and max length #1208

Other changes

  • Use with_localizations flag in ApplicationCommands #1196
  • Add Dialer property to Session #1179 and #1220
  • Add AppPermissions field to Interaction #1206
  • Add ExpiresAt field to Invite #1198
  • Add Features field to UserGuild #1223
  • Name and Description are omitted when unset in GuildTemplate #1191
  • Add replied_user to MessageAllowedMentions #1175
  • fix: check if opus created #1166
  • Add ability to reply with embeds #1160
  • Add missing fields to VoiceState #1190
  • Add GET prefix for ApplicationCommands bucketID #1193
  • Add GuildID field to ApplicationCommand #1207
  • Add omitempty to channel_id in MessageReference #1002
  • Add UserGuildMember #1210
  • Add missing fields to GuildMemberParams #1226

Special thanks

Full Changelog: v0.25.0...v0.26.0

DiscordGo v0.25.0

17 Apr 22:12
cd95ccc
Compare
Choose a tag to compare

Hi all! This one is not so feature-rich, but is filled with lots of fixes and missing features.

What's Changed

Breaking changes

  • Removed omitempty from Embeds in InteractionResponseData, MessageSend and MessageEdit #1106
  • RateLimitPerUser in ChannelEdit was made a pointer #1152
  • appID was removed from the parameters of InteractionResponseXXX and FollowupMessageXXX #1125
  • GuildEmojiEdit now resets whitelisted roles of an emoji when provided with nil or empty role slice #1022

New features

  • Stage Instances #1158
  • IconURL for GuildPreview #885
  • GuildWithCounts #885
  • Added GuildMembersSearch #1150
  • Added GuildEmoji #1153
  • Added GuildScheduledEventUserAdd and GuildScheduledEventUserDelete events #1155
  • Custom JSON marshal/unmarshal functions #1162
  • Added GuildMemberEditComplex #1122
  • Application commands localization #1143

Other changes

  • Removed appID comment from InteractionRespond method #1123
  • Moved RESTError to restapi.go #1130
  • Removed GuildSubscriptions field from Identify struct #992
  • Add missing permission constants (UseActivities, ManageEvents, UseExternalStickers) #1144
  • Fix debug message printing when Session.Debug is disabled #1043
  • Update Go version in CI by @Jleagle in #1147
  • Showcase of parsing options into a map in slash commands example #1129
  • Removed omitempty from non-optional MessageEmbed* fields #1001
  • Added example of emojiID to MessageReactionAdd #798
  • Added NSFWLevel to Guild #1029
  • Fixed shadowed error variables #1030
  • Added option to disable rate-limited requests retry #1151
  • Added Flags to MessageEdit #973
  • Added RequestGuildMembersList method #1156
  • Added InviteComplex #1163

Special thanks

Full Changelog: v0.24.0...v0.25.0

DiscordGo v0.24.0

02 Mar 19:42
45e625d
Compare
Choose a tag to compare

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

DiscordGo v0.23.1

26 Jan 18:49
e6a8d51
Compare
Choose a tag to compare

Hi all! v0.23.1 contains a bug fix relating to updating statuses, correcting the casing used in the JSON sent to the gateway, meaning that you can actually update your status now! I envision that there might be more minor fixes in the near future as a continuation of the switch to API v8, but in the meantime make sure to update if you're running into issues with updating your bot's status.

DiscordGo v0.23.0

24 Jan 00:56
d4d47b6
Compare
Choose a tag to compare

Hi all! This is a big one.

API Version 8

The largest change for this version: the library now uses API version 8! Given the breaking changes in the API, there will be some breaking changes in this version:

  • Intents are now mandatory. The library continues to default to enabling all non-privileged intents, but it is no longer possible to disable intents entirely like it was in v6. Consequently, the Intents field in the Identify struct is no longer a pointer, and the use of MakeIntent is no longer required.
  • The Game struct is no more, and UpdateStatus was changed to UpdateGameStatus to better reflect the API structures. The previous uses of Game can now be encompassed in Activity.
  • Presences and presence updates no longer contain information about nicknames and roles; these are now sent exclusively by guild member updates.
  • Permissions are now represented by int64 rather than int throughout the library, as although there are no permissions currently above 32 bits, Discord explicitly notes that they expect to add additional permissions in the future.
  • Permission overwrite types now have constants in the library, rather than requiring a string value.

There will probably be issues that are discovered with the API version change. As always, please feel free to file an issue if any come up!

Additional Changes

  • Support for news channels #800
  • Support for user public flags #801
  • Support for guild member muting and deafening #804
  • Support for querying old voice state information in updates #833
  • Add application ID to webhooks #838
  • Support for replies #842
  • Support for fetching guild bans #848
  • Webhook interaction request verification #855
  • Add pending field for members #863

Special Thanks To

DiscordGo v0.22.0

26 Jul 02:45
befbea8
Compare
Choose a tag to compare

Hi all! This version is a bit of a smaller one, but with one big change to long-time users of the library: the develop branch is no more! We found that the divide was confusing for first-time contributors, and while it was necessary is the old days of Go, modules make the two-branch workflow unnecessary. We will now keep all changes in a single branch for simplicity. Still, we do have a few new features, and I'd be remiss if I didn't mention them:

Special Thanks To

for all the help and contributions to this project—leading to this release! You are all very appreciated!

New Features

  • General field updates to reflect API changes #785
  • Fetching of guild emojis from API #786
  • Support removal of user from voice channel #789
  • Allowed mentions functionality for webhooks #794

As a plus, this one-branch workflow should allow us to release...well...releases more often, as instead of a merge all that will be required is a new tag. Move fast and break things, as they say (or said).

DiscordGo v0.21.0

21 Jun 02:52
eb35145
Compare
Choose a tag to compare

(note: this release has been directly superseded by v0.21.1 due to a mixup in the merge and the immutability of the Go module proxy; please refer to that version if you're pinning against a version!)

This one was a bit of a long time coming. Say hello to DiscordGo v0.21.0!

Special Thanks To

for all the help and contributions to this project—leading to this release! You are all very appreciated!

Breaking Changes

  • The "Gateway Intents" system is now supported and enabled by default. See the wiki for information on disabling it.
  • Session.MessageReactions now takes additional parameters supporting pagination; set both to "" to retain current functionality. #626
  • Session.RequestGuildMembers now takes an additional parameter indicating whether to request member presences.
  • Session.Guild no longer attempts to fetch the guild from the state, bringing it in line with other Session methods. Use Session.State.Guild to do so. #683

Bug Fixes

  • Missing fields in GuildChannelCreateData added #782
  • Resumes are now functioning after a long-standing bug preventing them on reconnects #761
  • Internal API URL changed from discordapp.com to discord.com #772

New Features

  • "Allowed mentions" functionality, allowing mentions in a message to be allowed or blocked on an allowlist basis (did I say allow?) #761
  • Fetch message details after its deletion if messages are being tracked in the state #743
  • Request guild members for multiple guilds #709

Want more infomation?

Read the PRs, Issues, Commits associated with this release.

DiscordGo v0.20.0

18 Oct 15:50
Compare
Choose a tag to compare

Special Thanks To

for all the help and contributions to this project - leading to this release! You are all very appreciated!

BREAKING CHANGES

  • Added Support for WebhookExecute msg response #663
  • Fix typo in ErrorEmbedDisabled #697

Bugs Fixed

  • Escape # in emoji IDs passed to reaction endpoints
  • Removed _trace from helloOp #654
  • Helped to make Dark Theme folks a bit less sad. #664 #665
  • Fixed broken IP Discovery in voice UDP connection #669
  • Use the Voice UDP Endpoint IP from the Ready payload instead of the WebSocket endpoint #704

Other Changes

  • Added copy of previous Message state to MessageUpdate #545
  • Added last_pin_timestamp to Channel struct #596
  • Removed code duplication in ChannelVoiceJoin #611
  • Added "Priority Speaker" permission as constant #628
  • Added Pinned to Message struct #633
  • Added SnowflakeTimestamp utility function #641
  • Added User-Agent setting to Session struct #653
  • Added premium fields to Guild and Member #656
  • Added EndpointGuildIconAnimated #658
  • Added Guild.IconURL() helper #658
  • Added Asset type and ApplicationAssets method. #666
  • Handle empty channel id in ChannelVoiceJoinManual #672
  • Added Available field to Emoji struct https://github.com/bwmarrin/discordgo/pull/676
  • Added Premium Guild Subscription message types & Added Channel Types #679
  • Added new VerificationLevel VerificationLevelVeryHigh #680 #681
  • Added RateLimitPerUser to Channel struct
  • Added several newer fields to the Message object #699

Want more infomation?

Read the PRs, Issues, Commits associated with this release.

DiscordGo v0.19.0

02 Nov 19:20
Compare
Choose a tag to compare

Alright, DiscordGo v0.19.0 :) I know this should have happened 6 months or more ago. I've become more and more busy with work, life, and a new baby :) DiscordGo still has my heart though and thanks to all the amazing contributors, it has continued to grow and keep up with Discord's API changes!

For future reference, DiscordGo now has 706 stars, 167 forks, and 46 contributors!

Special Thanks To

for all the help and contributions to this project - leading to this release! You are all very appreciated!

BREAKING CHANGES

  • GuildChannelCreate method now takes ChannelType parameter #511
  • GuildIntegrations method now takes a []*Integrations parameter instead of []*GuildIntegration #514

Fixes

  • Fix role mention replacement #509
  • Fixed ContentWithMoreMentionsReplaced() for roles #521
  • Change State.MemberAdd to set fields individually #533
  • Reduce data sent to the DAPI in GuildChannelsReorder #537

Enhancements

  • Add ChannelID to WebhookEdit #445
  • AvatarURL will now return a link to the default avatar instead of an invalid link if the user has no avatar set. #488
  • Support for Game Activity Types #500
  • Get Guild Audit Log endpoint implemented #504
  • Added Role.Mention function #507
  • Support unsetting Game & Setting to "Listening To" #508
  • Added UserConnections method that will list user connections #514
  • Documentation improvements #516
  • GuildMemberAdd method added #523
  • Added Explicit Content Filter Levels, MfaLevel, WidgetEnabled, WidgetChallenID, SystemChannelID #527
  • Removed state checking from (s *Session) Guild(...) to be consistent #530
  • Add Icon channel field #531
  • Added Mention() func for Channel #536
  • Add GuildID to several structs #541
  • Added GuildEmojiCreate, GuildEmojiEdit, and GuildEmojiDelete methods #551
  • Added InviteWithCounts method #552
  • Add an explicit log and error for when a request is attempted with an unauthorized token that is not a bot token #553
  • Added locale to User struct #555
  • Added userlimit to the channel struct #557
  • Added support for the Unique field to ChannelInviteCreate #558
  • Added Webhooks Update event #561
  • Added MessageFormat() to emoji struct #569
  • Added ChannelVoiceJoinManual #578
  • Add PermissionManageEmojis and PermissionManageWebhooks to PermissionAll #580
  • Added rate_limit_per_user to ChannelEdit #585
  • Added latency method #593
  • Now update state member count on GUILD_MEMBER_ADD and GUILD_MEMBER_REMOVE #602
  • Added WebhookID to message struct #607

Want more infomation?

Read the PRs, Issues, Commits associated with this release.