Releases: andersfylling/disgord
fix type for interaction data values
The values field in interaction data was corrected to string
. Should fix potential unmarshal errors sent out by the demultiplexer.
v0.32.0
Had to introduce a breaking change while fixing up ApplicationCommandInteractionData
; the type referred to component_type
and not the actual type
, which is misleading.
Added:
- resolved struct for interaction data
- Values, TargetID, ComponentType and Type field to interaction data
- MaxValues, MinValues, Placeholder field to message component
v0.31.1
Fixes:
- deprecated error vars with atypical naming scheme in favor of what is seen in the std packages
- added missing fields to VoiceState
v0.31.0
Some minor changes to make it a bit simpler to work with slash/application commands. See examples/application-commands for more.
This includes breaking changes to application commands interface.
Full Changelog: v0.30.2...v0.31.0
patch missing intents field in identify
When no config.Intents
, Config.RejectEvents
, Config.DMIntents
was specified the gateway would try to connect/identify without a intents
value causing the connection to fail.
Patch Guild.MembersByName causing nil panic
v0.30.1 fix: Guild.MembersByName causes nil panic (close #463)
v0.30.0
Big release
Features:
- replaced rest builder methods with the tradition struct parameter (eg.
Channel(id).UpdateBulder(..) => Channel(id).Update(*UpdateChannel)
- add events
- GUILD_SCHEDULED_EVENT_CREATE
- GUILD_SCHEDULED_EVENT_UPDATE
- GUILD_SCHEDULED_EVENT_DELETE
- GUILD_SCHEDULED_EVENT_USER_ADD
- GUILD_SCHEDULED_EVENT_USER_REMOVE
- THREAD_CREATE
- THREAD_UPDATE
- THREAD_DELETE
- THREAD_LIST_SYNC
- THREAD_MEMBER_UPDATE
- THREAD_MEMBERS_UPDATE
- GUILD_STICKERS_UPDATE
- INTERACTION_CREATE
- shorter REST arguments (deprecated the
Params
suffix) Config.RejectEvents
andConfig.DMIntents
are deprecated in favor ofConfig.Intents
- renamed
KickVoiceParticipant
=>DisconnectVoiceParticipant
to clarify intent - More consistency for errors, making it easier to use errors.Is when utilizing the REST methods (local failures only)
- slash commands / application commands support!
- Thread support!
Intents
There has been some confusion around RejectEvents and DMIntents. They aren't mutually exclusive, and with privileged events/intents, it makes more sense to explicitly specify which events/intents the bot requires instead.
Currently I will only support setting intents, for simplicity sake. Later I might add an alternative, but the Config.Intents
field is there to stay, unless Discord deprecated the feature.
REST update methods
Until now, Disgord has been using the builder pattern to allow sending default values. See more here: #420
This has been replaced in favor of the typical struct argument, to make methods more consistent and ease maintenance (the code generation was a bit too magical).
newChannelName := "new channel name"
// before
channel, err := client.Channel(23).UpdateBuilder().
SetTitle(newChannelName).
Execute()
// after
channel, err := client.Channel(23).Update(&UpdateChannel{
Title: &newChannelName, // note the pointer value
})
breaking changes
I strongly encourage everyone to explicitly set intents in the config. Upgrading to a later release might cause your bot to not work as all intents are enabled by default in earlier Disgord versions.
Breaking:
Client.Channel(..).CreateInvite(..)
is no longer a builder and takes aCreateInvite
struct.Client.Channel(..).Update(..)
no longer has a reason parameterClient.Guild(..).Role(..).Update(..)
no longer has a reason parameterClient.Guild(..).PruneMembers(..)
- no longer has a reason parameter
- returns a prune count
- InteractionCallbackType constant received a
InteractionCallback
prefix (disgord.Pong
=>disgord.InteractionCallbackPong
) - removed build tag
disgordperf
- thread methods were restrctured (breaking only for people depending on the master branch)
- Emoji(..).Update(..) method no longer has a reason parameter
I hope I have covered everything!
See v0.29.0...v0.30.0 for more information
Thanks to the contributors:
- introducing threads
- application commands
- reporting bugs
- discussing design choices
v0.29
features:
- disgordtest package to help you writing tests
- added missing message flags
- removed deprecated features
- removed disgord.Flag from function signatures. These can now be injected using "WithFlags", similar to "WithContext".
Fixes:
- all the REST methods to use exported types, so everything can be properly tested on your end now
- mention for animated emoji
v0.28.3
Added fixes for copying logic
v0.28.2
Marked sticker deprecated
fixed generated code