Structures
The following structures are available globally.
-
Checks if a user is allowed to execute based on their ID
See morelet checker = IDChecker(ids: ["123"]) let user = User(id: "456") checker.check(user, canUse: command, on: event) // false let userTwo = User(id: "123") checker.check(userTwo, canUse: command, on: event) // true
Declaration
Swift
public struct IDChecker : CommandPermissionChecker
-
Base command
See moreDeclaration
Swift
public struct Command : ExecutableCommand
-
Base command with one argument
See moreDeclaration
Swift
public struct OneArgCommand<A> : ExecutableCommand where A : CommandArgumentConvertible
-
Base command with two arguments
See moreDeclaration
Swift
public struct TwoArgCommand<A, B> : ExecutableCommand where A : CommandArgumentConvertible, B : CommandArgumentConvertible
-
Base command with three arguments
See moreDeclaration
Swift
public struct ThreeArgCommand<A, B, C> : ExecutableCommand where A : CommandArgumentConvertible, B : CommandArgumentConvertible, C : CommandArgumentConvertible
-
Base command with four or more arguments
See moreDeclaration
Swift
public struct ArrayArgCommand : ExecutableCommand
-
Declaration
Swift
public struct NoCommands : Commands
-
Event passed in to a command closure containing required data.
See moreDeclaration
Swift
public struct CommandEvent
-
SwiftHooks configuration. Use
See more.default
for default config.Declaration
Swift
public struct SwiftHooksConfig
-
Used to identify hooks.
See moreDeclaration
Swift
public struct HookID : Hashable
-
Group multiple
See moreEventListeners
together.Declaration
Swift
public struct Listeners : EventListeners
-
NOOP provider for
See moreEventListeners
.Declaration
Swift
public struct NoListeners : EventListeners
-
Listener used to listen to specific hook events.
See moreListener(Discord.messageCreate) { ... } Listener(MyHook.myCustomEvent) { ... }
Declaration
Swift
public struct Listener<T, I, D> : EventListeners where T : _Event, I == T.ContentType, D == T.D
-
Declaration
Swift
public struct GlobalListener<T, I> : EventListeners where T : _GEvent, I == T.ContentType
-
Declaration
Swift
public struct _GlobalEvent<ContentType> : _GEvent
-
Declaration
Swift
public struct GlobalDispatch : EventDispatch