Documentation
¶
Index ¶
- Variables
- type Config
- type Context
- func (c *Context) GetRoleByID(id disgord.Snowflake) (*disgord.Role, error)
- func (c *Context) GetRoleByName(name string) (*disgord.Role, error)
- func (c *Context) MemberHasPermission(permission disgord.PermissionBit) (bool, error)
- func (c *Context) MemberHasRole(role *disgord.Role) (bool, error)
- func (c *Context) Reply(msg string) (*disgord.Message, error)
- type Dismand
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRoleNotFound is returned when the searched role is not found ErrRoleNotFound = errors.New("role not found") )
Functions ¶
This section is empty.
Types ¶
type Context ¶
Context contains the recieved message, the Disgord client, and the active session
func (*Context) GetRoleByID ¶
GetRoleByID will find the role in the server with the same ID. Returns ErrRoleNotFound if the role was not found.
func (*Context) GetRoleByName ¶
GetRoleByName will try to find the role in the server with the same name. If multiple roles have the same name it will return the first role. Returns ErrRoleNotFound if the role was not found.
func (*Context) MemberHasPermission ¶
func (c *Context) MemberHasPermission(permission disgord.PermissionBit) (bool, error)
MemberHasPermission will check if the user has the specified permission
func (*Context) MemberHasRole ¶
MemberHasRole will check if the user has the specified role
type Dismand ¶
type Dismand struct {
// contains filtered or unexported fields
}
func (*Dismand) MessageHandler ¶
func (d *Dismand) MessageHandler(s disgord.Session, evt *disgord.MessageCreate)
func (*Dismand) RegisterDefaults ¶
RegisterDefaults registers the default Dismand commands
Ping, Help, Enable, Disable
Click to show internal directories.
Click to hide internal directories.