Index
Modules:
dimscmd
,
dimscmd/commandOptions
,
dimscmd/common
,
dimscmd/discordUtils
,
dimscmd/interactionUtils
,
dimscmd/macroUtils
,
dimscmd/scanner
,
dimscmd/utils
.
API symbols
addAlias:
dimscmd: addAlias(group: CommandGroup; commandName: string; aliases: openArray[string])
addChat:
dimscmd: addChat(router: CommandHandler; name: string; handler: untyped): untyped
addChatAlias:
dimscmd: addChatAlias(router: CommandHandler; commandName: string; aliases: openArray[string])
addSlash:
dimscmd: addSlash(router: CommandHandler; name: string; parameters: varargs[untyped]): untyped
addSlashAlias:
dimscmd: addSlashAlias(router: CommandHandler; commandName: string; aliases: openArray[string])
aliases:
common: aliases(command: Command): seq[string]
Array:
ProcParameterSetting.Array
ChatCommandProc:
common: ChatCommandProc
chatCommandsAll:
common: chatCommandsAll(cmd: CommandHandler): seq[Command]
checkSlashName:
utils: checkSlashName(name: string): bool
Command:
common: Command
CommandGroup:
common: CommandGroup
CommandHandler:
common: CommandHandler
CommandScanner:
scanner: CommandScanner
CommandType:
common: CommandType
ctChatCommand:
CommandType.ctChatCommand
ctSlashCommand:
CommandType.ctSlashCommand
defaultHelpMessage:
dimscmd: defaultHelpMessage(m: Message; handler: CommandHandler; commandName: string): owned( Future[void])
Enum:
ProcParameterSetting.Enum
EnumOption:
common: EnumOption
flatten:
common: flatten(group: CommandGroup; name = ""): seq[Command]
Future:
ProcParameterSetting.Future
get:
common: get(root: CommandGroup; key: openArray[string]): Command
interactionUtils: get(scnr; kind: typedesc[bool]; key: string): Option[bool]
interactionUtils: get(scnr; kind: typedesc[GuildChannel]; key: string): Future[ Option[GuildChannel]]
interactionUtils: get(scnr; kind: typedesc[int]; key: string): Option[int]
interactionUtils: get(scnr; kind: typedesc[Role]; key: string): Future[Option[Role]]
interactionUtils: get(scnr; kind: typedesc[string]; key: string): Option[string]
interactionUtils: get[T: enum](scnr; kind: typedesc[T]; key: string): Option[T]
interactionUtils: get(scnr; kind: typedesc[User]; key: string): Future[Option[User]]
getCommandOption:
commandOptions: getCommandOption(parameter: ProcParameter): ApplicationCommandOptionType
getDoc:
macroUtils: getDoc(prc: NimNode): string
getGroup:
common: getGroup(root: CommandGroup; key: openArray[string]): CommandGroup
getGuildID:
common: getGuildID(root: CommandGroup): string
getGuildRole:
discordUtils: getGuildRole(api: RestApi; gid, id: string): Future[Role]
getParameterDescription:
macroUtils: getParameterDescription(prc: NimNode; name: string): string
getParameters:
macroUtils: getParameters(parameters: NimNode): seq[ProcParameter]
getParamTypes:
macroUtils: getParamTypes(prc: NimNode): seq[NimNode]
getScannerCall:
dimscmd: getScannerCall(parameter: ProcParameter; scanner: NimNode; getInner = false): NimNode
getTail:
interactionUtils: getTail(data: ApplicationCommandInteractionData): InteractionCommandData
getWords:
interactionUtils: getWords(i: Interaction): seq[string]
utils: getWords(input: string): seq[string]
handleInteraction:
dimscmd: handleInteraction(router: CommandHandler; s: Shard; i: Interaction): Future[bool]
handleMessage:
dimscmd: handleMessage(router: CommandHandler; prefixes: seq[string]; msg: Message): Future[ bool]
dimscmd: handleMessage(router: CommandHandler; prefixes: seq[string]; s: Shard; msg: Message): Future[bool]
dimscmd: handleMessage(router: CommandHandler; prefix: string; msg: Message): Future[bool]
dimscmd: handleMessage(handler: CommandHandler; prefix: string; s: Shard; msg: Message): Future[ bool]
HandlerProcs:
common: HandlerProcs
has:
common: has(root: CommandGroup; key: openArray[string]): bool
hasMore:
scanner: hasMore(scanner: CommandScanner): bool
input:
scanner: input(scanner: CommandScanner): string
InteractionScanner:
interactionUtils: InteractionScanner
leafName:
utils: leafName(input: string): string
map:
common: map(root: CommandGroup; cmd: Command)
common: map(root: CommandGroup; key: openArray[string]; cmd: Command)
mapAltPath:
common: mapAltPath(root: CommandGroup; a, b: openArray[string])
matchIdent:
utils: matchIdent(id: string; body: untyped): untyped
name:
common: name(command: Command): string
newGroup:
common: newGroup(cmd: Command): CommandGroup
common: newGroup(name: string; description: string; children: seq[CommandGroup] = @[]): CommandGroup
newHandler:
dimscmd: newHandler(discord: DiscordClient; msgVariable: string = "msg"): CommandHandler
newInteractionGetter:
interactionUtils: newInteractionGetter(i: Interaction; api: RestApi): InteractionScanner
newScanner:
scanner: newScanner(api: RestApi; msg: Message): CommandScanner
scanner: newScanner(input: string; api: RestApi = nil): CommandScanner
next:
scanner: next(scanner: CommandScanner; kind: typedesc[Future[GuildChannel] | GuildChannel]): Future[GuildChannel]
scanner: next(scanner: CommandScanner; kind: typedesc[Future[Role] | Role]): Future[Role]
scanner: next(scanner: CommandScanner; kind: typedesc[Future[User] | User]): Future[User]
scanner: next[T, size: static[int]](scanner: CommandScanner; kind: typedesc[array[size, auto]]): array
scanner: next(scanner: CommandScanner; kind: typedesc[bool]): bool
scanner: next[T](scanner: CommandScanner; kind: typedesc[Future[Option[T]]]): Future[ Option[T]]
scanner: next[T](scanner: CommandScanner; kind: typedesc[Future[seq[T]]]): Future[seq[T]]
scanner: next(scanner: CommandScanner; kind: typedesc[int]): int
scanner: next[T](scanner: CommandScanner; kind: typedesc[Option[T]]): Option[T]
scanner: next[T](scanner: CommandScanner; kind: typedesc[seq[T]]): seq[T]
scanner: next(scanner: CommandScanner; kind: typedesc[string]): string
scanner: next[T: enum](scanner: CommandScanner; kind: typedesc[T]): T
scanner: next[T: range](scanner: CommandScanner; kind: typedesc[T]): T
nextToken:
scanner: nextToken(scanner: CommandScanner): string
nextWord:
utils: nextWord(input: string; output: var string; start = 0): int
Optional:
ProcParameterSetting.Optional
parseUntil:
scanner: parseUntil(scanner: CommandScanner; until: char): string
print:
common: print(group: CommandGroup; depth = 1)
ProcParameter:
common: ProcParameter
ProcParameterSetting:
common: ProcParameterSetting
raiseScannerError:
scanner: raiseScannerError(msg: string)
register:
dimscmd: register(router: CommandHandler; name: string; handler: ChatCommandProc)
dimscmd: register(router: CommandHandler; name: string; handler: SlashCommandProc)
registerCommands:
dimscmd: registerCommands(handler: CommandHandler): owned(Future[void])
ScannerError:
scanner: ScannerError
scanProc:
scanner: scanProc(prc: untyped): untyped
Sequence:
ProcParameterSetting.Sequence
skipPast:
scanner: skipPast(scanner: CommandScanner; tokens: seq[string])
scanner: skipPast(scanner: CommandScanner; token: string)
skipWhitespace:
scanner: skipWhitespace(scanner: CommandScanner)
SlashCommandProc:
common: SlashCommandProc
slashCommandsAll:
common: slashCommandsAll(cmd: CommandHandler): seq[Command]
toApplicationCommand:
commandOptions: toApplicationCommand(command: Command): ApplicationCommand
commandOptions: toApplicationCommand(group: CommandGroup): ApplicationCommand
toChoices:
commandOptions: toChoices(options: seq[EnumOption]): seq[ApplicationCommandOptionChoice]
toOptions:
commandOptions: toOptions(parameters: seq[ProcParameter]): seq[ApplicationCommandOption]