Documentation ¶
Index ¶
- type Overwrite
- type OverwriteType
- type Permission
- func (b *Permission) Add(a ...Permission)
- func (x Permission) Administrator() bool
- func (b *Permission) Clear(a ...Permission)
- func (x Permission) Has(perm Permission) bool
- func (b Permission) MarshalJSON() (dst []byte, err error)
- func (b Permission) Serialize() (data map[Permission]bool)
- func (p Permission) String() string
- func (b *Permission) UnmarshalJSON(bytes []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Overwrite ¶
type Overwrite struct { ID snowflake.ID `json:"id"` Type OverwriteType `json:"type"` Allow Permission `json:"allow"` Deny Permission `json:"deny"` }
type OverwriteType ¶
type OverwriteType uint8
const ( RoleOverwrite OverwriteType = iota MemberOverwrite )
type Permission ¶
type Permission uint64
const ( CreateInstantInvite Permission = 1 << iota KickMembers BanMembers Administrator ManageChannels ManageGuild AddReactions ViewAuditLog PrioritySpeaker Stream ViewChannel SendMessages SendTTSMessages ManageMessages EmbedLinks AttachFiles ReadMessageHistory MentionEveryone UseExternalEmojis ViewGuildInsights Connect Speak MuteMembers DeafenMembers MoveMembers UseVAD ChangeNickname ManageNicknames ManageRoles ManageWebhooks ManageEmojisAndStickers UseApplicationCommands RequestToSpeak ManageEvents ManageThreads CreatePublicThreads CreatePrivateThreads UseExternalStickers SendMessagesInThreads UseEmbeddedActivities ModerateMembers All = CreateInstantInvite | KickMembers | BanMembers | Administrator | ManageChannels | ManageGuild | AddReactions | ViewAuditLog | PrioritySpeaker | Stream | ViewChannel | SendMessages | SendTTSMessages | ManageMessages | EmbedLinks | AttachFiles | ReadMessageHistory | MentionEveryone | UseExternalEmojis | ViewGuildInsights | Connect | Speak | MuteMembers | DeafenMembers | MoveMembers | UseVAD | ChangeNickname | ManageNicknames | ManageRoles | ManageWebhooks | ManageEmojisAndStickers | UseApplicationCommands | RequestToSpeak | ManageEvents | ManageThreads | CreatePublicThreads | CreatePrivateThreads | UseExternalStickers | SendMessagesInThreads | UseEmbeddedActivities | ModerateMembers )
func (*Permission) Add ¶
func (b *Permission) Add(a ...Permission)
func (Permission) Administrator ¶
func (x Permission) Administrator() bool
func (*Permission) Clear ¶
func (b *Permission) Clear(a ...Permission)
func (Permission) Has ¶
func (x Permission) Has(perm Permission) bool
func (Permission) MarshalJSON ¶
func (b Permission) MarshalJSON() (dst []byte, err error)
func (Permission) Serialize ¶
func (b Permission) Serialize() (data map[Permission]bool)
func (Permission) String ¶
func (p Permission) String() string
String returns string representation of permission
func (*Permission) UnmarshalJSON ¶
func (b *Permission) UnmarshalJSON(bytes []byte) (err error)
Click to show internal directories.
Click to hide internal directories.