IDChecker
public struct IDChecker : CommandPermissionChecker
Checks if a user is allowed to execute based on their ID
let 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 func check(_ user: Userable, canUse command: _ExecutableCommand, on event: CommandEvent) -> Bool