Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions restapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,10 @@ func (s *Session) ChannelMessageSendComplex(channelID string, data *MessageSend,
}
}

if data.AllowedMentions == nil && s.AllowedMentions != nil {
data.AllowedMentions = s.AllowedMentions
}

for _, embed := range data.Embeds {
if embed.Type == "" {
embed.Type = "rich"
Expand Down
3 changes: 3 additions & 0 deletions structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ type Session struct {

// used to make sure gateway websocket writes do not happen concurrently
wsMutex sync.Mutex

// used to set the global default allowed mentions
AllowedMentions *MessageAllowedMentions
}

// ApplicationIntegrationType dictates where application can be installed and its available interaction contexts.
Expand Down