Commit graph

346 commits

Author SHA1 Message Date
ozraru
f75d834aa5
feat(User): add DisplayName method (#1609) 2025-04-13 16:55:15 +03:00
Derk-Jan Hartman
5571950c90
Fix error in emoji range (#1585)
Use A-Za-z range instead of A-z range
2025-03-30 14:04:04 +03:00
Evan Robinson
69ea356662
feat(structs): add intents for guild and direct message polls (#1612) 2025-03-30 14:03:57 +03:00
aping
7f344fbe5e
feat: implement Subscription events (#1591) 2025-03-17 12:46:31 +03:00
Alex
d4827e8d77
feat: add guild member banners (#1592) 2025-03-17 12:22:05 +03:00
Jonas
33ffff21d3
Add Entitlements / SKUs (#1552)
Pull Request: https://github.com/bwmarrin/discordgo/pull/1552

Copied Message from Commits:

* add entitlement struct

* add entitlements field to interaction struct

* add event handler for entitlements

* add description to Entitlement struct & type

* properly format changes in entitlement and events

* format entitlement with gofmt

* move entitlement to structs

* add subscription id to entitlement struct and add omitempty

* add endpoints

* add comments to EntitlementTest and EntitlementOwnerType

* add sku struct

* add skus

* fix typo

* rename skuid in entitlement struct

* add comments to SKUFlags

* change entitlement timestamps to time.Time

* rename skuid in entitlement-test struct

* add documentation

* remove undocumented subscriptionID field in entitlement struct

* add documentation

* update documentation

* change order of EntitlementType values

* move optional entitlement filter options into a separate struct

* add premium button component

* add subscriptions

* optimize optional fields in entitlement struct

* Add documentation

* typo

* remove unneccessary pointers
2024-12-08 17:16:00 +10:00
Big Iron
247b6f7a76
Application Emojis (#1566)
---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2024-10-06 19:53:15 +03:00
Cyb3r Jak3
0a25bf41b9
feat(VoiceRegion): add missing fields (#1571)
Add the following fields to VoiceRegion struct: Optimal, Deprecated, Custom
2024-10-06 19:50:34 +03:00
PinkNoize
7fded9fd03
fix(PollResults): AnswerCounts json name (#1576) 2024-10-06 19:14:21 +03:00
Ofek Asido
247dbd7f5c
fix(auditlog): typo in AuditLogChangeKeyPublicUpdatesChannelID (#1574) 2024-10-01 19:48:13 +03:00
Tom Wright
33044e2858
fix(Activity): accept non-string application ids (#1513) 2024-07-07 22:07:35 +03:00
Earlopain
28f8d4252d
feat: add new permissions (#1411) 2024-06-22 17:53:03 +03:00
Julien
5f7833673e
feat(AutomoderationActionMetadata): add custom_message (#1515) 2024-06-22 11:59:27 +03:00
Fedor Lapshin
d26ad10ba6
feat: implement polls (#1525)
* feat: add poll events

* feat: add poll structs

* feat(MessageSend): add poll field

* feat(InteractionResponseData): add poll field

* feat: add endpoints
2024-06-21 10:37:32 +03:00
Fedor Lapshin
a31fd8617e
feat: user apps (#1511)
* feat: add integration types

* feat(ApplicationCommand): add integration_types

* feat(interactions): implement contexts

* feat(Interaction): add authorizing_integration_owners

* chore(ApplicationCommand): deprecate DMPermission

* feat(Application): add integration_types_config

* feat(Message): add InteractionMetadata

* feat(ApplicationIntegrationTypeConfig): add omitempty tag to OAuth2InstallParams

* feat(Application): add omitempty tag to IntegrationTypesConfig
2024-06-20 17:56:18 +03:00
Earlopain
cf4e4e070f
feat(auditlog): add onboarding and server guide actions (#1532)
Implement https://github.com/discord/discord-api-docs/pull/6041
2024-06-05 23:52:43 +03:00
Shadat Rahman
68c6268227
feat: add GUILD_MEDIA and GUILD_DIRECTORY channel types (#1514) 2024-04-01 12:52:13 +03:00
Shadat Rahman
33ee38cbf2
feat(UserGuilds)!: support with_counts parameter (#1500)
---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2024-03-15 18:22:29 +03:00
Earlopain
202785c50b
feat(role): add flags (#1410)
---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2024-03-07 18:51:22 +03:00
Earlopain
384ff4e9a9
feat(member): add flags (#1499)
---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2024-02-29 17:50:39 +03:00
Earlopain
c3f22cb8ab
feat(message)!: use partial sticker objects (#1494) 2024-02-26 14:13:17 +03:00
SamusAranX
603114195a
feat(roles): add support for icons and unicode emojis (#1334)
---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2024-01-02 11:09:44 +03:00
Earlopain
30b2cf22b4
feat(guild): implement onboarding (#1401)
Add guild onboarding endpoints and related structs.
---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2024-01-01 08:01:07 +03:00
Julien Tant
13748a3431
feat(member): add helper function for display name (#1426) 2023-12-29 23:22:24 +03:00
ikafly144
d2fd4c5587
feat(ThreadMember): implement Member field (#1325)
* Add Member field to TreadMember

* Add query params to ThreadMember and ThreadMembers

* Add json tag

* docs: add periods

* fix: gofmt

* docs: document withMember parameter

* docs(Session.ThreadMember): rephrase description of withMember parameter

---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2023-12-23 06:44:08 +03:00
Earlopain
a2079d3138
feat(auditlog): add monetization actions (#1442) 2023-09-07 15:56:33 +03:00
Earlopain
8ca6533433
feat(auditlog): add integration_type to options (#1440) 2023-09-04 00:19:40 +03:00
Earlopain
393091b18c
fix(auditlog): use correct values for AuditLogOptionsType (#1413) 2023-07-29 04:38:16 +03:00
Loghin Alexandru
a90485df0c
feat(ws): add toggle for voice reconnects on session reconnect (#1350)
* Add flag for voice reconnect on session reconnect

* Rename ShouldReconnectVoiceConnOnError toggle as suggested

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>

* Fix indentaion for discord.go

* Change wording in docs

---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2023-06-05 16:21:06 +03:00
Fedor Lapshin
af63880a0b
fix(ChannelEdit)!: omit empty Position (#1385)
Make Position field a pointer and add omitempty JSON option to avoid
setting it to 0 when it is not specified.
2023-06-05 16:07:40 +03:00
Earlopain
fc4a3ce97d
feat(auditlog): add application_id to AuditLogOptions (#1380) 2023-05-25 17:22:26 +03:00
Earlopain
160605c9c3
feat(auditlog): add auto moderation actions and options (#1371) 2023-05-14 18:42:41 +03:00
Fedor Lapshin
69f6c46a34
fix(AuditLogGuildScheduledEventUpdate): typo (#1370) 2023-04-24 04:29:04 +03:00
Fedor Lapshin
6958472163
Implement Audit Log Entry Create event (#1314)
* Implement GUILD_AUDIT_LOG_ENTRY_CREATE event.
* Rename IntentGuildBans constant to IntentGuildModeration to match API documentation.
2023-04-07 16:19:12 +03:00
Adam Snyder
1115a47c5d
fix: ThreadMember flags not serialized (#1335) 2023-03-10 02:31:46 +03:00
LightningDev1
916f693c00
Add GIF sticker format (#1330)
* Add GIF sticker format

* Replace tab with spaces
2023-02-21 01:36:18 +03:00
Fedor Lapshin
d583fd1d1e
feat(GuildPreview.IconURL): add docs for size
Add documentation comment for size parameter of GuildPreview.IconURL
function.
2023-01-18 02:03:15 +03:00
Sentinel
cb59c78e32
Add size parameters to IconURL and BannerURL (#1301)
* Add missing parameters/structs

Adds guild icon size parameter, guild banner size parameter, missing ClientStatus struct

* Add missing endpoint for animated banners

* feat: revert ClientStatus changes

Revert addition of ClientStatus since another PR was already merged with
it.

* feat: add documentation for size parameter

* refactor: move icon url logic into separate func

Move logic for icon URLs in various functions into a single iconURL
function. Similar to banner and avatar functions.

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2023-01-18 01:59:00 +03:00
ikafly144
ae8894be67
Add Forum settings to Channel struct (#1306)
* Add DefaultRateLimitPerUser DefaultSortOrder DefaultForumLayout to Channel struct

* Add prefix

* Add prefix

* Fix typo

* Fix field name typo

* Add to ChannelEdit struct

* Fix order and name

* Fix name

* Apply suggestions from code review

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>

* feat: cosmetic changes

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2023-01-03 19:19:08 +03:00
ikafly144
2daab506b2
Add Presence ClientStatus (#1303)
* Add ClientStatus struct

* Add ClientStatus struct

* Add comment

* Update structs.go

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2022-12-29 20:52:07 +03:00
ikafly144
5e7e320c89
Automod trigger metadata update (#1305)
* Add AllowList and MentionTotalLimit

* Add pointer

* Fix
2022-12-27 21:14:29 +03:00
Fedor Lapshin
4eef78e7e4
Role connections (#1295)
* feat: role connection metadata

* feat: add role connection endpoints

Add User Application Role Connection endpoints:
* Get User Application Role Connection
* Update User Application Role Connection

* feat: add example

Add basic example to showcase linked roles flow.

* refactor(endpoints): move role connection metadata

Move Application Role Connection Metadata endpoint to other Application
endpoints.
2022-12-26 02:31:49 +03:00
Fedor Lapshin
8a5201aae6
feat(GuildParams): make PremiumProgressBarEnabled pointer
Make PremiumProgressBarEnabled field of GuildParams a pointer to allow
for the false value.
2022-12-17 23:16:09 +03:00
Fedor Lapshin
2a22f54711
fix: typo in system channel flag constants
Fix typo in names of SystemChannelFlagsSuppressGuildReminderNotifications and SystemChannelFlagsSuppressJoinNotificationReplies constants.
2022-12-17 23:08:14 +03:00
Ringo Hoffmann
e741fc2790
Complement GuildParams struct to comply with Discord's API (#1255)
* complement `GuildParams` struct [fix #994]

* fix: naming and spelling

* fix: gofmt

* refactor: use Locale type for PreferredLocale

Co-authored-by: zekro <private@zekro.de>
Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2022-12-17 23:03:18 +03:00
Fedor Lapshin
e580734d0b
Regex patterns automod rule trigger (#1275)
* feat: add regex pattern automod trigger

Add regex patterns metadata to AutoModerationTriggerMetadata.

* feat: add regex pattern example

Add showcase of regex filter into auto_moderation example.

* feat: cosmetic changes

Add period to the end of RegexPatterns documentation comment.
2022-11-17 00:57:13 +03:00
Fedor Lapshin
fb0566fac2
fix(EmojiRegex): longer ids (#1274)
Fix EmojiRegex to accept emojis with ids up to 20 characters long
2022-11-08 23:30:53 +03:00
Tsvetomir Bonev
bb321271cd
fix(structs): fix type of GuildScheduledEvent* enum values (#1254) 2022-10-07 14:41:27 +03:00
Fedor Lapshin
e57064892a
Forum channels (#1246)
* feat: forums

Initial implementation of forum channels REST API

* fix: linter

* feat: cosmetic changes

Added periods in the end of all documentation comments

* fix(ChannelFlagRequireTag): incorrect value

Fix incorrect value of ChannelFlagRequireTag.

* refactor(DefaultReaction): rename to ForumDefaultReaction

Rename DefaultReaction to ForumDefaultReaction.

* fix(Channel): use ForumDefaultReaction

Use ForumDefaultReaction instead of DefaultReaction in DefaultReactionEmoji field.

* fix: gofmt

* feat: cosmetic changes

* Change "GUILD_FORUM" to "forum" in comment to ForumTag
* Fix spacing for documentation of embeds parameter in ForumThreadStartEmbeds

* docs(ForumThreadStartComplex): align parameters

Align documentation for parameters of ForumThreadStartComplex.
2022-09-29 23:24:27 +03:00
Fedor Lapshin
576ecf0003
REST methods cleanup (#1217)
* refactor(GuildRoleEdit)!: use struct params

Refactor GuildRoleEdit to accept parameters using a Params struct.
Therefore also allow partial edits.

* feat(GuildRoleCreate): initial parameters

Make GuildRoleCreate accept a struct with initial parameters for a role

* refactor(ChannelEdit)!: replace ChannelEditComplex

Move funcitonality of ChannelEditComplex to ChannelEdit

* chore: deprecate ChannelEditComplex

* feat(GuildEmbed)!: allow partial edits

* Make fields omitempty
* Make `Enabled` field a pointer

* refactor(GuildEmbedEdit)!: use params struct

Refactor GuildEmbedEdit to accept parameters through GuildEmbed struct

* refactor(GuildMemberEdit)!: replace GuildMemberEditComplex

Move functionality fo GuildMemberEditComplex to GuildMemberEdit

* chore: deprecate GuildMemberEditComplex

* refactor(GuildEmojiCreate)!: use struct params

Refactor GuildEmojiCreate to take parameters using EmojiParams struct.

* refactor(GuildEmojiEdit)!: use struct params

Refactor GuildEmojiEdit to take parameters using EmojiParams struct.

* refactor(GuildMemberAdd)!: use struct params

Refactor GuildMemberAdd to take parameters using GuildMemberAddParams struct.

* refactor(GuildTemplateEdit)!: use struct params

Refactor GuildTemplateEdit to take parameters using GuildTemplateParams struct.

* refactor(GuildTemplateCreate)!: use struct params

Refactor GuildTemplateCreate to take parameters using GuildTemplateParams struct.

* chore(rest)!: use pointers for Params structs

Refactor methods with Params struct to use pointers

* chore: grammar and style fixes in comments
2022-08-17 18:41:11 +03:00