28 lines
902 B
Go
28 lines
902 B
Go
package api
|
|
|
|
// DefaultAllowedMentions gives you the default AllowedMentions
|
|
var DefaultAllowedMentions = AllowedMentions{
|
|
Parse: []AllowedMentionType{AllowedMentionTypeUsers, AllowedMentionTypeRoles, AllowedMentionTypeEveryone},
|
|
Roles: []string{},
|
|
Users: []string{},
|
|
RepliedUser: true,
|
|
}
|
|
|
|
// AllowedMentions are used for avoiding mentioning users in Message and Interaction
|
|
type AllowedMentions struct {
|
|
Parse []AllowedMentionType `json:"parse"`
|
|
Roles []string `json:"roles"`
|
|
Users []string `json:"users"`
|
|
RepliedUser bool `json:"replied_user"`
|
|
}
|
|
|
|
// AllowedMentionType ?
|
|
type AllowedMentionType string
|
|
|
|
// All AllowedMentionType(s)
|
|
const (
|
|
AllowedMentionTypeRoles AllowedMentionType = "roles"
|
|
AllowedMentionTypeUsers AllowedMentionType = "users"
|
|
AllowedMentionTypeEveryone AllowedMentionType = "everyone"
|
|
)
|