Documentation
¶
Index ¶
- func ComputeBasePermissions(guild discord.Guild, member discord.MemberWithUser) (p discord.Permission)
- func ComputeOverwrites(base discord.Permission, guild discord.Guild, member discord.MemberWithUser, ...) (p discord.Permission)
- func ComputePermissions(guild discord.Guild, member discord.MemberWithUser, channel discord.Channel) (p discord.Permission)
- func MemberHighestRole(roles []discord.Role, member []snowflake.ID) discord.Role
- func SortedGuildRoles(roles []discord.Role) []discord.Role
- func SortedMemberRoles(guild []discord.Role, member []snowflake.ID) (result []discord.Role)
- type Creator
- type Session
- type Shard
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeBasePermissions ¶
func ComputeBasePermissions(guild discord.Guild, member discord.MemberWithUser) (p discord.Permission)
func ComputeOverwrites ¶
func ComputeOverwrites(base discord.Permission, guild discord.Guild, member discord.MemberWithUser, overwrites discord.PermissionOverwrites) (p discord.Permission)
func ComputePermissions ¶
func ComputePermissions(guild discord.Guild, member discord.MemberWithUser, channel discord.Channel) (p discord.Permission)
func MemberHighestRole ¶
Types ¶
type Creator ¶
type Session ¶
type Session interface {
api.Client
API() api.Client
Events() events.SessionDispatcher
Cache() cache.Store
Log() golog.Logger
ShardID(guild snowflake.ID) uint16
Get(id uint16) Shard
Ping() int
Shards() []uint16
ShardCount() uint16
// Alive checks if shard is connected to the Discord Gateway. It is good to check when you want to make sure the cache is up-to-date.
//
// If no shard id is provided, then all shards of current Session instance are checked. It is not recommended in most cases.
//
// If gateway reach the max reconnection limit, it will wait 5 minutes before next try. Of course, you won't receive any new events you have to handle but if you have the interval jobs (or dashboard), you should be sure the specific shard is connected.
Alive(shard ...uint16) bool
// Unavailable checks if guild is not available due to outage or has not been loaded from lazy GUILD_CREATE events yet.
FetchMembers(ctx context.Context, params ws.RequestGuildMembersParams) ([]discord.MemberWithUser, []discord.Presence, error)
PermissionsIn(guild, channel, member snowflake.ID) (discord.Permission, error)
SortedMemberRoles(guild, member snowflake.ID) ([]discord.Role, error)
Shutdown()
Start()
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.