Skip to content

Commit cc81d04

Browse files
committed
Squashed commit of the following:
commit 3cb3c74 Author: Toπ <[email protected]> Date: Tue Aug 26 08:58:48 2025 +0200 add support for selects in modals (#158) commit 1c13eea Author: davfsa <[email protected]> Date: Mon Aug 25 21:42:17 2025 +0200 fix: multiple gateway logic bugfixes (#468) commit b5c57a8 Author: Toπ <[email protected]> Date: Thu Aug 21 15:03:48 2025 +0200 fix: implement identify rate limiting for gateway sharding (#467) commit aa070bf Author: sebm253 <[email protected]> Date: Wed Aug 20 18:19:39 2025 +0200 Add PermissionPinMessages discord/discord-api-docs#7766 commit 7dd438b Author: Toπ <[email protected]> Date: Wed Aug 20 14:16:20 2025 +0200 fix: ensure open returns on invalid session (#466) commit 9507a2e Author: davfsa <[email protected]> Date: Wed Aug 20 00:06:29 2025 +0200 feat: allow passing resume url for proper startup (#465) commit 562fe73 Author: davfsa <[email protected]> Date: Tue Aug 19 22:01:48 2025 +0200 feat: add support for new RATE_LIMIT gateway event (#464) commit ac49b29 Author: topi314 <[email protected]> Date: Tue Aug 19 20:42:37 2025 +0200 refactor: use context in logger calls for gateway operations commit 4d7a156 Author: Toπ <[email protected]> Date: Tue Aug 19 00:07:42 2025 +0200 Add status check before sending to gateway (#462) commit b9359df Author: topi314 <[email protected]> Date: Tue Aug 19 00:05:07 2025 +0200 call close handler on reconnect error commit 2e5b06b Author: topi314 <[email protected]> Date: Wed Aug 13 01:53:20 2025 +0200 refactor: change rest.Error to always be returned as a pointer commit 441f348 Author: Toπ <[email protected]> Date: Wed Aug 13 01:45:15 2025 +0200 fix guild cache logic for unavailable states (#461) commit b03b02e Author: Toπ <[email protected]> Date: Sun Aug 10 00:19:13 2025 +0200 Add ResumeShard method and ShardState struct to manage shard session and sequence (#460) commit ac1984f Author: topi314 <[email protected]> Date: Sun Aug 10 00:15:33 2025 +0200 fix unknown component with type x received error commit bb32bd4 Author: topi314 <[email protected]> Date: Tue Aug 5 00:15:54 2025 +0200 pass reconnect variable to gateway close handlers commit 7ea7ef5 Author: topi314 <[email protected]> Date: Mon Aug 4 21:58:23 2025 +0200 always override shard ids in shard manager config when using WithShardIDs commit e9d502c Author: Ankit Malik <[email protected]> Date: Fri Aug 1 22:25:00 2025 +0530 Add ComponentEmoji constructors and builder methods (#459) commit 0720f59 Author: sebm253 <[email protected]> Date: Wed Jul 30 11:10:44 2025 +0200 Remove guild deletion API commit 482a53c Author: sebm253 <[email protected]> Date: Wed Jul 30 11:10:03 2025 +0200 Remove OwnerID from GuildUpdate commit 73ca7f0 Author: sebm253 <[email protected]> Date: Wed Jul 30 11:09:36 2025 +0200 Add GuildFeatureGuildTags discord/discord-api-docs#7710 commit 5e92dd8 Author: sebm253 <[email protected]> Date: Mon Jul 28 23:48:03 2025 +0200 Remove guild creation API discord/discord-api-docs#7715 commit e2ee9e3 Author: sebm253 <[email protected]> Date: Thu Jul 24 20:16:05 2025 +0200 Add MemberFlagAutomodQuarantinedGuildTag discord/discord-api-docs#7699 commit 22f1edf Author: sebm253 <[email protected]> Date: Wed Jul 23 22:19:15 2025 +0200 Add AuditLogAutoModerationQuarantineUser discord/discord-api-docs#7706 commit b2668c6 Author: sebm253 <[email protected]> Date: Sat Jul 19 22:09:27 2025 +0200 Add new activity fields discord/discord-api-docs#7674 commit 1328ec5 Author: sebm253 <[email protected]> Date: Wed Jul 2 22:50:54 2025 +0200 Add email and phone number mentions discord/discord-api-docs#7657 commit 01bba29 Author: sebm253 <[email protected]> Date: Wed Jul 2 21:13:33 2025 +0200 Revert "Add UnusualDMActivityUntil to Member" This reverts commit 3ab1280. commit 7532856 Author: Sebastian <[email protected]> Date: Wed Jul 2 11:05:10 2025 +0200 Add guild tags (#353) * Add clans * fix url * rename Clan to PrimaryGuild discord/discord-api-docs@82f3d7b * rename to guild tag --------- Co-authored-by: mlnrDev <[email protected]> commit 3ab1280 Author: sebm253 <[email protected]> Date: Tue Jul 1 21:49:02 2025 +0200 Add UnusualDMActivityUntil to Member commit b642511 Author: Sebastian <[email protected]> Date: Mon Jun 30 23:58:13 2025 +0200 Add guest invites (#278) * Add guest invites * rename const --------- Co-authored-by: mlnrDev <[email protected]> commit 7c62b71 Author: Sebastian <[email protected]> Date: Thu Jun 26 18:43:51 2025 +0200 Add role gradient colors (#453) * reformat imports & update .editorconfig * Add role gradient colors * i have no idea whats going on --------- Co-authored-by: topi314 <[email protected]> commit 6267de0 Author: Sebastian <[email protected]> Date: Sat Jun 21 12:21:01 2025 +0200 Use new pin endpoints (#457) * Use new pin endpoints * dumbass * topi didnt say anything so im pushing this hoping he notices and lets me know commit 3bfbd77 Author: topi314 <[email protected]> Date: Sat Jun 21 12:00:26 2025 +0200 update dependencies commit 0af01ec Author: Norio Nomura <[email protected]> Date: Sat Jun 21 18:57:17 2025 +0900 Merge pull request #458 from norio-nomura/fix-update-current-member-to-return-discord-member Fix `Members.UpdateCurrentMember` to return `discord.Member` commit af333cf Author: sebm253 <[email protected]> Date: Sun Jun 15 23:42:57 2025 +0200 Add AssetURL to Nameplate commit 273c3d9 Author: sebm253 <[email protected]> Date: Sun Jun 15 22:13:36 2025 +0200 Add nameplates discord/discord-api-docs#7614 commit 80335a6 Author: sebm253 <[email protected]> Date: Fri Jun 13 11:45:27 2025 +0200 Add ApproximateUserAuthorizationCount to Application discord/discord-api-docs#7613 commit f7d9242 Author: sebm253 <[email protected]> Date: Fri Jun 13 11:35:27 2025 +0200 Add Name and Size to FileComponent discord/discord-api-docs#7609 commit ae72a64 Merge: de575c1 8ac2ef0 Author: sebm253 <[email protected]> Date: Thu Jun 12 22:52:04 2025 +0200 Merge remote-tracking branch 'origin/master' commit de575c1 Author: sebm253 <[email protected]> Date: Thu Jun 12 22:51:34 2025 +0200 Add AttachmentID to UnfurledMediaItem discord/discord-api-docs#7611
1 parent bfbc98a commit cc81d04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1239
-531
lines changed

_examples/modals/example.go

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
package main
2+
3+
import (
4+
"context"
5+
"log"
6+
"log/slog"
7+
"os"
8+
"os/signal"
9+
"strings"
10+
"syscall"
11+
12+
"github.com/disgoorg/disgo"
13+
"github.com/disgoorg/disgo/bot"
14+
"github.com/disgoorg/disgo/discord"
15+
"github.com/disgoorg/disgo/events"
16+
"github.com/disgoorg/disgo/gateway"
17+
"github.com/disgoorg/disgo/handler"
18+
)
19+
20+
var (
21+
token = os.Getenv("disgo_token")
22+
23+
commands = []discord.ApplicationCommandCreate{
24+
discord.SlashCommandCreate{
25+
Name: "modal",
26+
Description: "brings up a modal",
27+
IntegrationTypes: []discord.ApplicationIntegrationType{
28+
discord.ApplicationIntegrationTypeUserInstall,
29+
discord.ApplicationIntegrationTypeGuildInstall,
30+
},
31+
Contexts: []discord.InteractionContextType{
32+
discord.InteractionContextTypeGuild,
33+
discord.InteractionContextTypeBotDM,
34+
discord.InteractionContextTypePrivateChannel,
35+
},
36+
},
37+
}
38+
)
39+
40+
func main() {
41+
slog.Info("starting example...")
42+
slog.Info("disgo version", slog.String("version", disgo.Version))
43+
44+
client, err := disgo.New(token,
45+
bot.WithGatewayConfigOpts(gateway.WithIntents(gateway.IntentsNone)),
46+
bot.WithEventListenerFunc(commandListener),
47+
bot.WithEventListenerFunc(modalListener),
48+
)
49+
if err != nil {
50+
log.Fatal("error while building disgo instance: ", err)
51+
return
52+
}
53+
54+
defer client.Close(context.TODO())
55+
56+
if err = handler.SyncCommands(client, commands, nil); err != nil {
57+
log.Fatal("error while registering commands: ", err)
58+
}
59+
60+
if err = client.OpenGateway(context.TODO()); err != nil {
61+
log.Fatal("error while connecting to gateway: ", err)
62+
}
63+
64+
slog.Info("example is now running. Press CTRL-C to exit.")
65+
s := make(chan os.Signal, 1)
66+
signal.Notify(s, syscall.SIGINT, syscall.SIGTERM, os.Interrupt)
67+
<-s
68+
}
69+
70+
func commandListener(event *events.ApplicationCommandInteractionCreate) {
71+
data := event.SlashCommandInteractionData()
72+
if data.CommandName() == "modal" {
73+
if err := event.Modal(discord.NewModalCreateBuilder().
74+
SetTitle("Modal Title").
75+
SetCustomID("modal-id").
76+
AddLabel("short text", discord.NewShortTextInput("short-text-input")).
77+
AddLabel("paragraph text", discord.NewParagraphTextInput("paragraph-text-input")).
78+
AddLabel("select menu", discord.NewStringSelectMenu("select-menu", "select something idiot",
79+
discord.NewStringSelectMenuOption("helo", "helo"),
80+
discord.NewStringSelectMenuOption("uwu", "uwu"),
81+
discord.NewStringSelectMenuOption("owo", "owo"),
82+
).
83+
WithMinValues(0).
84+
WithMaxValues(2),
85+
).
86+
Build(),
87+
); err != nil {
88+
event.Client().Logger.Error("error creating modal", slog.Any("err", err))
89+
}
90+
}
91+
}
92+
93+
func modalListener(event *events.ModalSubmitInteractionCreate) {
94+
var content string
95+
for component := range event.Data.AllComponents() {
96+
switch c := component.(type) {
97+
case discord.TextInputComponent:
98+
content += c.CustomID + ": " + c.Value + "\n"
99+
case discord.StringSelectMenuComponent:
100+
content += c.CustomID + ": " + strings.Join(c.Values, ", ") + "\n"
101+
}
102+
}
103+
104+
if err := event.CreateMessage(discord.MessageCreate{
105+
Content: content,
106+
}); err != nil {
107+
event.Client().Logger.Error("error creating modal", slog.Any("err", err))
108+
}
109+
}

_examples/proxy/example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func main() {
5454
gateway.WithURL(gatewayURL), // set the custom gateway url
5555
gateway.WithCompress(false), // we don't want compression as that would be additional overhead
5656
),
57-
sharding.WithRateLimiter(sharding.NewNoopRateLimiter()), // disable sharding rate limiter as the proxy handles it
57+
sharding.WithIdentifyRateLimiter(gateway.NewNoopIdentifyRateLimiter()), // disable sharding rate limiter as the proxy handles it
5858
),
5959
bot.WithRestClientConfigOpts(
6060
rest.WithURL(restURL), // set the custom rest url

_examples/sharding/example.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ func main() {
2525

2626
client, err := disgo.New(token,
2727
bot.WithShardManagerConfigOpts(
28-
sharding.WithShardIDs(0, 1),
29-
sharding.WithShardCount(2),
28+
sharding.WithShardIDs(0, 1), // Remove this to use discord's default recommended shard count
29+
sharding.WithShardCount(2), // Remove this to use discord's default recommended shard count
3030
sharding.WithAutoScaling(true),
3131
sharding.WithGatewayConfigOpts(
3232
gateway.WithIntents(gateway.IntentGuilds, gateway.IntentGuildMessages, gateway.IntentDirectMessages),

bot/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ func BuildClient(
323323
gateway.WithDevice(name),
324324
),
325325
sharding.WithLogger(cfg.Logger),
326-
sharding.WithDefaultRateLimiterConfigOpt(
327-
sharding.WithMaxConcurrency(gatewayBotRs.SessionStartLimit.MaxConcurrency),
328-
sharding.WithRateLimiterLogger(cfg.Logger),
326+
sharding.WithDefaultIdentifyRateLimiterConfigOpt(
327+
gateway.WithIdentifyMaxConcurrency(gatewayBotRs.SessionStartLimit.MaxConcurrency),
328+
gateway.WithIdentifyRateLimiterLogger(cfg.Logger),
329329
),
330330
}, cfg.ShardManagerConfigOpts...)
331331

bot/event_manager.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type EventManager interface {
3535
RemoveEventListeners(eventListeners ...EventListener)
3636

3737
// HandleGatewayEvent calls the correct GatewayEventHandler for the payload
38-
HandleGatewayEvent(gatewayEventType gateway.EventType, sequenceNumber int, shardID int, event gateway.EventData)
38+
HandleGatewayEvent(gateway gateway.Gateway, eventType gateway.EventType, sequenceNumber int, event gateway.EventData)
3939

4040
// HandleHTTPEvent calls the HTTPServerEventHandler for the payload
4141
HandleHTTPEvent(respondFunc httpserver.RespondFunc, event httpserver.EventInteractionCreate)
@@ -94,7 +94,7 @@ type GatewayEventHandler interface {
9494
HandleGatewayEvent(client *Client, sequenceNumber int, shardID int, event gateway.EventData)
9595
}
9696

97-
// NewGatewayEventHandler returns a new GatewayEventHandler for the given GatewayEventType and handler func
97+
// NewGatewayEventHandler returns a new GatewayEventHandler for the given gateway.EventType and handler func
9898
func NewGatewayEventHandler[T gateway.EventData](eventType gateway.EventType, handleFunc func(client *Client, sequenceNumber int, shardID int, event T)) GatewayEventHandler {
9999
return &genericGatewayEventHandler[T]{eventType: eventType, handleFunc: handleFunc}
100100
}
@@ -131,13 +131,13 @@ type eventManagerImpl struct {
131131
httpServerHandler HTTPServerEventHandler
132132
}
133133

134-
func (e *eventManagerImpl) HandleGatewayEvent(gatewayEventType gateway.EventType, sequenceNumber int, shardID int, event gateway.EventData) {
134+
func (e *eventManagerImpl) HandleGatewayEvent(gateway gateway.Gateway, eventType gateway.EventType, sequenceNumber int, event gateway.EventData) {
135135
e.mu.Lock()
136136
defer e.mu.Unlock()
137-
if handler, ok := e.gatewayHandlers[gatewayEventType]; ok {
138-
handler.HandleGatewayEvent(e.client, sequenceNumber, shardID, event)
137+
if handler, ok := e.gatewayHandlers[eventType]; ok {
138+
handler.HandleGatewayEvent(e.client, sequenceNumber, gateway.ShardID(), event)
139139
} else {
140-
e.logger.Warn("no handler for Gateway event found", slog.Any("event_type", gatewayEventType))
140+
e.logger.Warn("no handler for Gateway event found", slog.Any("event_type", eventType))
141141
}
142142
}
143143

bot/handlers/presence_update_handler.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,11 @@ func isActivityUpdated(old discord.Activity, new discord.Activity) bool {
120120
compareActivityTimestampsPtr(old.Timestamps, new.Timestamps) ||
121121
compareStringPtr(old.SyncID, new.SyncID) ||
122122
old.ApplicationID != new.ApplicationID ||
123+
compareStatusDisplayTypePtr(old.StatusDisplayType, new.StatusDisplayType) ||
123124
compareStringPtr(old.Details, new.Details) ||
125+
compareStringPtr(old.DetailsURL, new.DetailsURL) ||
124126
compareStringPtr(old.State, new.State) ||
127+
compareStringPtr(old.StateURL, new.StateURL) ||
125128
comparePartialEmojiPtr(old.Emoji, new.Emoji) ||
126129
compareActivityPartyPtr(old.Party, new.Party) ||
127130
compareActivityAssetsPtr(old.Assets, new.Assets) ||
@@ -204,7 +207,7 @@ func compareActivityAssetsPtr(old *discord.ActivityAssets, new *discord.Activity
204207
if old == nil || new == nil {
205208
return true
206209
}
207-
return old.LargeText != new.LargeText || old.LargeImage != new.LargeImage || old.SmallText != new.SmallText || old.SmallImage != new.SmallImage
210+
return old.LargeText != new.LargeText || old.LargeImage != new.LargeImage || old.LargeURL != new.LargeURL || old.SmallText != new.SmallText || old.SmallImage != new.SmallImage || old.SmallURL != new.SmallURL
208211
}
209212

210213
func compareActivitySecretsPtr(old *discord.ActivitySecrets, new *discord.ActivitySecrets) bool {
@@ -216,3 +219,13 @@ func compareActivitySecretsPtr(old *discord.ActivitySecrets, new *discord.Activi
216219
}
217220
return old.Join != new.Join || old.Spectate != new.Spectate || old.Match != new.Match
218221
}
222+
223+
func compareStatusDisplayTypePtr(old *discord.ActivityStatusDisplayType, new *discord.ActivityStatusDisplayType) bool {
224+
if old == nil && new == nil {
225+
return false
226+
}
227+
if old == nil || new == nil {
228+
return true
229+
}
230+
return *old != *new
231+
}

cache/caches.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ func (c *guildCacheImpl) IsGuildUnavailable(guildID snowflake.ID) bool {
102102
}
103103

104104
func (c *guildCacheImpl) SetGuildUnavailable(guildID snowflake.ID, unavailable bool) {
105-
if c.unavailableGuilds.Has(guildID) && unavailable {
105+
if c.unavailableGuilds.Has(guildID) && !unavailable {
106106
c.unavailableGuilds.Remove(guildID)
107-
} else if !c.unavailableGuilds.Has(guildID) && !unavailable {
107+
} else if !c.unavailableGuilds.Has(guildID) && unavailable {
108108
c.unavailableGuilds.Add(guildID)
109109
}
110110
}

discord/activity.go

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,26 @@ const (
2424

2525
// Activity represents the fields of a user's presence
2626
type Activity struct {
27-
ID string `json:"id"`
28-
Name string `json:"name"`
29-
Type ActivityType `json:"type"`
30-
URL *string `json:"url,omitempty"`
31-
CreatedAt time.Time `json:"created_at"`
32-
Timestamps *ActivityTimestamps `json:"timestamps,omitempty"`
33-
SyncID *string `json:"sync_id,omitempty"`
34-
ApplicationID snowflake.ID `json:"application_id,omitempty"`
35-
Details *string `json:"details,omitempty"`
36-
State *string `json:"state,omitempty"`
37-
Emoji *PartialEmoji `json:"emoji,omitempty"`
38-
Party *ActivityParty `json:"party,omitempty"`
39-
Assets *ActivityAssets `json:"assets,omitempty"`
40-
Secrets *ActivitySecrets `json:"secrets,omitempty"`
41-
Instance *bool `json:"instance,omitempty"`
42-
Flags ActivityFlags `json:"flags,omitempty"`
43-
Buttons []string `json:"buttons,omitempty"`
27+
ID string `json:"id"`
28+
Name string `json:"name"`
29+
Type ActivityType `json:"type"`
30+
URL *string `json:"url,omitempty"`
31+
CreatedAt time.Time `json:"created_at"`
32+
Timestamps *ActivityTimestamps `json:"timestamps,omitempty"`
33+
SyncID *string `json:"sync_id,omitempty"`
34+
ApplicationID snowflake.ID `json:"application_id,omitempty"`
35+
StatusDisplayType *ActivityStatusDisplayType `json:"status_display_type,omitempty"`
36+
Details *string `json:"details,omitempty"`
37+
DetailsURL *string `json:"details_url,omitempty"`
38+
State *string `json:"state,omitempty"`
39+
StateURL *string `json:"state_url,omitempty"`
40+
Emoji *PartialEmoji `json:"emoji,omitempty"`
41+
Party *ActivityParty `json:"party,omitempty"`
42+
Assets *ActivityAssets `json:"assets,omitempty"`
43+
Secrets *ActivitySecrets `json:"secrets,omitempty"`
44+
Instance *bool `json:"instance,omitempty"`
45+
Flags ActivityFlags `json:"flags,omitempty"`
46+
Buttons []string `json:"buttons,omitempty"`
4447
}
4548

4649
func (a *Activity) UnmarshalJSON(data []byte) error {
@@ -149,8 +152,10 @@ type ActivityParty struct {
149152
type ActivityAssets struct {
150153
LargeImage string `json:"large_image,omitempty"`
151154
LargeText string `json:"large_text,omitempty"`
155+
LargeURL string `json:"large_url,omitempty"`
152156
SmallImage string `json:"small_image,omitempty"`
153157
SmallText string `json:"small_text,omitempty"`
158+
SmallURL string `json:"small_url,omitempty"`
154159
}
155160

156161
// ActivitySecrets contain secrets for Rich Presence joining and spectating
@@ -159,3 +164,11 @@ type ActivitySecrets struct {
159164
Spectate string `json:"spectate,omitempty"`
160165
Match string `json:"match,omitempty"`
161166
}
167+
168+
type ActivityStatusDisplayType int
169+
170+
const (
171+
ActivityStatusDisplayTypeName ActivityStatusDisplayType = iota
172+
ActivityStatusDisplayTypeState
173+
ActivityStatusDisplayTypeDetails
174+
)

discord/application.go

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,34 @@ import (
1313
)
1414

1515
type Application struct {
16-
ID snowflake.ID `json:"id"`
17-
Name string `json:"name"`
18-
Icon *string `json:"icon,omitempty"`
19-
Description string `json:"description"`
20-
RPCOrigins []string `json:"rpc_origins"`
21-
BotPublic bool `json:"bot_public"`
22-
BotRequireCodeGrant bool `json:"bot_require_code_grant"`
23-
Bot *User `json:"bot,omitempty"`
24-
TermsOfServiceURL *string `json:"terms_of_service_url,omitempty"`
25-
PrivacyPolicyURL *string `json:"privacy_policy_url,omitempty"`
26-
CustomInstallURL *string `json:"custom_install_url,omitempty"`
27-
InteractionsEndpointURL *string `json:"interactions_endpoint_url,omitempty"`
28-
RoleConnectionsVerificationURL *string `json:"role_connections_verification_url"`
29-
InstallParams *InstallParams `json:"install_params"`
30-
Tags []string `json:"tags"`
31-
Owner *User `json:"owner,omitempty"`
32-
VerifyKey string `json:"verify_key"`
33-
Team *Team `json:"team,omitempty"`
34-
GuildID *snowflake.ID `json:"guild_id,omitempty"`
35-
Guild *Guild `json:"guild,omitempty"`
36-
PrimarySkuID *snowflake.ID `json:"primary_sku_id,omitempty"`
37-
Slug *string `json:"slug,omitempty"`
38-
CoverImage *string `json:"cover_image,omitempty"`
39-
Flags ApplicationFlags `json:"flags,omitempty"`
40-
ApproximateGuildCount *int `json:"approximate_guild_count,omitempty"`
41-
ApproximateUserInstallCount *int `json:"approximate_user_install_count,omitempty"`
42-
IntegrationTypesConfig ApplicationIntegrationTypesConfig `json:"integration_types_config"`
16+
ID snowflake.ID `json:"id"`
17+
Name string `json:"name"`
18+
Icon *string `json:"icon,omitempty"`
19+
Description string `json:"description"`
20+
RPCOrigins []string `json:"rpc_origins"`
21+
BotPublic bool `json:"bot_public"`
22+
BotRequireCodeGrant bool `json:"bot_require_code_grant"`
23+
Bot *User `json:"bot,omitempty"`
24+
TermsOfServiceURL *string `json:"terms_of_service_url,omitempty"`
25+
PrivacyPolicyURL *string `json:"privacy_policy_url,omitempty"`
26+
CustomInstallURL *string `json:"custom_install_url,omitempty"`
27+
InteractionsEndpointURL *string `json:"interactions_endpoint_url,omitempty"`
28+
RoleConnectionsVerificationURL *string `json:"role_connections_verification_url"`
29+
InstallParams *InstallParams `json:"install_params"`
30+
Tags []string `json:"tags"`
31+
Owner *User `json:"owner,omitempty"`
32+
VerifyKey string `json:"verify_key"`
33+
Team *Team `json:"team,omitempty"`
34+
GuildID *snowflake.ID `json:"guild_id,omitempty"`
35+
Guild *Guild `json:"guild,omitempty"`
36+
PrimarySkuID *snowflake.ID `json:"primary_sku_id,omitempty"`
37+
Slug *string `json:"slug,omitempty"`
38+
CoverImage *string `json:"cover_image,omitempty"`
39+
Flags ApplicationFlags `json:"flags,omitempty"`
40+
ApproximateGuildCount *int `json:"approximate_guild_count,omitempty"`
41+
ApproximateUserInstallCount *int `json:"approximate_user_install_count,omitempty"`
42+
ApproximateUserAuthorizationCount *int `json:"approximate_user_authorization_count,omitempty"`
43+
IntegrationTypesConfig ApplicationIntegrationTypesConfig `json:"integration_types_config"`
4344
}
4445

4546
func (a Application) IconURL(opts ...CDNOpt) *string {

discord/audit_log.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ const (
108108
AuditLogAutoModerationBlockMessage
109109
AuditLogAutoModerationFlagToChannel
110110
AuditLogAutoModerationUserCommunicationDisabled
111+
AuditLogAutoModerationQuarantineUser
111112
)
112113

113114
const (

0 commit comments

Comments
 (0)