Releases: DiscordBM/DiscordBM
v1.4.0 - Some Fixes, DiscordBM Swift 5.9 release delayed
DiscordBM release to move to requiring Swift 5.9 has been delayed as i need to workaround some macro issues first.
The release might be delayed up to when Swift 5.9.1 is released.
What's Changed
- Fix
bot.updatePresence(payload:)
by @codemeister64 in #57 - Rename/deprecate
startThreadInForumChannel
tostartThreadInForumOrMediaChannel
.- The response contains the returned message too now.
New Contributors
- @codemeister64 made their first contribution in #57
Full Changelog: v1.3.1...v1.4.0
v1.3.1 - Next release will require Swift 5.9+
Next release will require Swift 5.9+
Next release will make heavy use of macros to for a decent amount of better user experience as well as some performance boosts.
I have decided the library will not support Swift versions lower than 5.9 as soon as the macro is merged.
What's Changed
- Increase default backoff
maxAllowed
from 5 to 6 seconds.- I have a personal feeling from my experience that a 6s
maxAllowed
will be decently better in practice, as 5s is exactly the age of a bucket and a second more could help users not notice rate-limit problems even less.
- I have a personal feeling from my experience that a 6s
- Some other minor refinements such as more documentation.
Full Changelog: v1.3.0...v1.3.1
v1.3.0 - Updates, fixes and refinements
What's Changed
- Correct
DiscordClient.createFollowupMessage()
payload type fromPayloads.InteractionResponse
toPayloads.ExecuteWebhook
.- This change should technically only happen in major versions as it's not one of the exempt technically-breaking changes that DiscordBM reserves the right to make, but the function wasn't working before anyway so the change is justified.
Reaction
now contains much more info (f54a928).AuditLog.Action
'smemberKick
case now containsintegration_type: Integration.Kind
.AuditLog.Action
'smemberRoleUpdate
case containedintegration_type: Integration.Kind?
.integration_type
is no longer of anOptional
type.JSONErrorCode
has a newuserCannotUseBurstReactions
.Team
contains a newvar role: Role
. Role is an enum with cases declared asadmin
,developer
orreadOnly
.owner< 8000 /code> While being a role in practice, it will still not appear as a case in
Role
.
Full Changelog: v1.2.0...v1.3.0
v1.2.0
What's Changed
- Update with Discord docs till Aug 11 (discord/discord-api-docs@3bebe03)
Gateway.Activity
now accepts a newstate: String?
field.- This is only useful when
type
is set to.custom
. - Read more: https://discord.com/developers/docs/change-log#aug-8-2023
- This is only useful when
- Fix errors thrown by
SnowflakeInfo
. - Minor testing refinements.
Full Changelog: v1.1.2...v1.2.0
v1.1.2 - Fix permission-checking functions for public/private threads
Fix permission-checking functions for public/private threads
The below list of functions of Gateway.GuildCreate
are affected by this change:
memberHasPermissions(member:userId:channelId:permissions:)
memberHasGuildPermission(member:userId:permission:)
userHasPermissions(userId:channelId:permissions:)
userHasGuildPermission(userId:permission:)
Full Changelog: v1.1.1...v1.1.2
v1.1.1 - Better `DiscordColor`s matching Apple's HIG + Update with Discord docs
Fixing v1.1.0 release
Some commits were stuck on my computer.
What's Changed
- Better static func/vars for getting colors, according to Apple's HIG.
- This includes all the colors that Apple lists in https://developer.apple.com/design/human-interface-guidelines/color#iOS-iPadOS-system-colors:
red
,orange
,yellow
,green
,mint
.teal
,cyan
,blue
,indigo
,purple
,pink
,brown
.- Examples:
DiscordColor.green
/DiscordColor.indigo(scheme: .light)
/DiscordColor.pink(scheme: .dark)
.
- Also includes the gray colors which come in 6 different levels: https://developer.apple.com/design/human-interface-guidelines/color#iOS-iPadOS-system-gray-colors:
- Examples:
DiscordColor.gray
/DiscordColor.gray(scheme: .light)
/DiscordColor.gray(level: .level3, scheme: .dark)
.
- Examples:
- This includes all the colors that Apple lists in https://developer.apple.com/design/human-interface-guidelines/color#iOS-iPadOS-system-colors:
- Add 2 new API endpoints:
updateGuildOnboarding(guildId:reason:payload:)
andgetOwnApplication()
. - Updated an existing API endpoint:
listOwnGuilds(before:after:limit:)
->listOwnGuilds(before:after:limit:withCounts:)
. - Add a new CDN endpoint:
getCDNUserAvatarDecoration(userId:avatarDecoration:)
. - Fixed an issue decoding optional arrays of
_ToleratedDecode
enums. - New fields in
DiscordApplication
andPartialApplication
:guild: PartialGuild?
,approximate_guild_count: Int?
. - New field in
DiscordUser
,PartialUser
andMentionUser
:avatar_decoration: String?
. - New
AuditLog.Entry.Action
cases:creatorMonetizationRequestCreated
andcreatorMonetizationTermsAccepted
. - Better decode tolerance in
AuditLog.Entry.Action
. - New
DiscordChannel.Attachment.Flag
type containing 1 case:isRemix
. - New field in
DiscordChannel.Attachment
:flags: IntBitField<Flag>
. - New
JSONErrorCode
cases:cannotEnableOnboardingRequirementsAreNotMet
andcannotUpdateOnboardingWhileBelowRequirements
. - New
MessageReactionAdd
field:message_author_id: UserSnowflake?
. - New
Guild.Onboarding.Mode
type containing 2 cases:onboardingDefault
andonboardingAdvanced
. - New field in
Guild.Onboarding
:mode: Mode
. - New field in
Payloads.CreateGuildChannel
:default_forum_layout: DiscordChannel.ForumLayout?
. - New
Role.Flag
type containing 1 case:inPrompt
. - New field in
Role
:flags: IntBitField<Flag>
.
Full Changelog: v1.0.0...v1.1.1
v1.1.0 - Better `DiscordColor`s matching Apple's HIG + Update with Discord docs
What's Changed
- Better static func/vars for getting colors, according to Apple's HIG.
- This includes all the colors that Apple lists in https://developer.apple.com/design/human-interface-guidelines/color#iOS-iPadOS-system-colors:
red
,orange
,yellow
,green
,mint
.teal
,cyan
,blue
,indigo
,purple
,pink
,brown
.- Examples:
DiscordColor.green
/DiscordColor.indigo(scheme: .light)
/DiscordColor.pink(scheme: .dark)
.
- Also includes the gray colors which come in 6 different levels: https://developer.apple.com/design/human-interface-guidelines/color#iOS-iPadOS-system-gray-colors:
- Examples:
DiscordColor.gray
/DiscordColor.gray(scheme: .light)
/DiscordColor.gray(level: .level3, scheme: .dark)
.
- Examples:
- This includes all the colors that Apple lists in https://developer.apple.com/design/human-interface-guidelines/color#iOS-iPadOS-system-colors:
- Add 2 new API endpoints:
updateGuildOnboarding(guildId:reason:payload:)
andgetOwnApplication()
. - Updated an existing API endpoint:
listOwnGuilds(before:after:limit:)
->listOwnGuilds(before:after:limit:withCounts:)
. - Add a new CDN endpoint:
getCDNUserAvatarDecoration(userId:avatarDecoration:)
. - Fixed an issue decoding optional arrays of
_ToleratedDecode
enums. - New fields in
DiscordApplication
andPartialApplication
:guild: PartialGuild?
,approximate_guild_count: Int?
. - New field in
DiscordUser
,PartialUser
andMentionUser
:avatar_decoration: String?
. - New
AuditLog.Entry.Action
cases:creatorMonetizationRequestCreated
andcreatorMonetizationTermsAccepted
. - Better decode tolerance in
AuditLog.Entry.Action
. - New
DiscordChannel.Attachment.Flag
type containing 1 case:isRemix
. - New field in
DiscordChannel.Attachment
:flags: IntBitField<Flag>
. - New
JSONErrorCode
cases:cannotEnableOnboardingRequirementsAreNotMet
andcannotUpdateOnboardingWhileBelowRequirements
. - New
MessageReactionAdd
field:message_author_id: UserSnowflake?
. - New
Guild.Onboarding.Mode
type containing 2 cases:onboardingDefault
andonboardingAdvanced
. - New field in
Guild.Onboarding
:mode: Mode
. - New field in
Payloads.CreateGuildChannel
:default_forum_layout: DiscordChannel.ForumLayout?
. - New
Role.Flag
type containing 1 case:inPrompt
. - New field in
Role
:flags: IntBitField<Flag>
.
Full Changelog: v1.0.0...v1.1.0
v1.0.0 - First Release :)
Full Changelog: v1.0.0-rc.3...v1.0.0
v1.0.0-rc.3
Breaking Changes
Message
types'author
are now of typeDiscordUser
instead ofPartialUser
.DiscordUtils. escapingSpecialCharacters()
now accepts options to try to not escape links, and to escape new lines.OptionalError.nilValue()
now doesn't contain atypeName
value.- Fix
VoiceState
objects to includePartialMember
instead ofMember
. - Removed undocumented properties from
PartialMember
. - Simplified
ShardingGatewayManager
logic, and some initializers are nowasync
.
Other Additions
- Add some new/missing stuff to
AuditLog
. - Add
ActionRow.Component
validations.
Full Changelog: v1.0.0-rc.2...v1.0.0-rc.3
v1.0.0-rc.2
Breaking Changes
ClientConfiguration.CachingBehavior
properties now useDuration
instead ofDouble
for time amounts.- This was a missed change from when I moved everything to use
Duration
.
- This was a missed change from when I moved everything to use
- Some "tag" snowflakes were mistakenly using
String
as their type. They now useForumTagSnowflake
. Interaction``Button
's initializers now have more compile-time safety. This probably shouldn't break codes that used to work.
Additions
- Added convenience functions for parsing
Interaction
s.StringIntDoubleBool
now has:requireString() throws -> String
requireInt() throws -> Int
requireDouble() throws -> Double
requireBool() throws -> Bool
Interaction.ApplicationCommand.Option
now has all theStringIntDoubleBool
functions for unwrapping an option'svalue
.Interaction.ApplicationCommand.Option
AND related types (like[Option]
) now have:option(named: String) -> Option?
requireOption(named: String) throws -> Option
Interaction.ActionRow
now has:requireButton() throws -> Button
requireStringSelect() throws -> StringSelectMenu
requireTextInput() throws -> TextInput
requireUserSelect() throws -> SelectMenu
requireRoleSelect() throws -> SelectMenu
requireMentionableSelect() throws -> SelectMenu
requireChannelSelect() throws -> ChannelSelectMenu
- Swift's
Optional
now hasrequireValue() throws
function overload inDiscordBM
. - Added
static var minimal
toCachingBehavior
to cache everything for0.1
seconds.
Full Changelog: v1.0.0-rc.1...v1.0.0-rc.2