package
0.0.0-20211209175121-4e18fe87588a
Repository: https://github.com/mavolin/adam.git
Documentation: pkg.go.dev

# Functions

All asserts that all the passed plugin.RestrictionFuncs return nil.
Allf works like All, but returns the passed returnError if one of the plugin.RestrictionFuncs returns an error.
AllRoles asserts that the user has all of the passed roles or is able to assign themselves all of the passed roles.
Any asserts that at least one of the passed plugin.RestrictionFuncs returns no error.
Anyf works like Any, but returns the passed returnError if all of the passed plugin.RestrictionFuncs return an error.
AnyRole asserts that the invoking user has at least one of the passed roles or has the ability to assign one of the passed roles to themself.
BotOwner asserts that a command is executed by a bot owner.
Channels asserts that a command is executed in one of the passed channels.
ChannelTypes asserts that a command is executed in a channel of an allowed type.
GuildOwner asserts that a command is executed by the guild owner.
MustAllRoles asserts that the user has all of the passed roles.
MustAnyRole asserts that the invoking user has at least one of the passed roles.
NewAllMissingRolesError creates a new *AllMissingRolesError.
NewAnyMissingRolesError creates a new error containing an error message for missing roles.
NewChannelsError creates a new error containing an error message containing the allowed channels.
NewChannelTypesError returns a new *ChannelTypesError created using the passed plugin.ChannelTypes.
NewFatalChannelTypesError returns a fatal new *ChannelTypesError created using the passed plugin.ChannelTypes.
NewUserPermissionsError returns a new error containing the missing permissions.
NSFW asserts that a command is executed in an NSFW channel.
UserPermissions asserts that the invoking user has the passed permissions.
Users creates a plugin.RestrictionFunc that defines a set of users that may use a command.

# Structs

AllMissingRolesError is the error returned if the user needs all roles stored in Missing.
AnyMissingRolesError is the error returned if the user needs any of the roles stored in Missing.
ChannelsError is the error returned if the user needs to invoke the command in any of channels whose ids are stored in Allowed.
ChannelTypesError is the error returned if the command must be invoked in one of the Allowed plugin.ChannelTypes, but is not.
EmbeddableError that formats differently, based on whether it is embedded in an any or all error, or whether it is used directly.
UserPermissionsError is the error returned if a user needs all permissions stored in Missing.