Uses of Class
com.github.alex1304.ultimategdbot.api.Context
-
Packages that use Context Package Description com.github.alex1304.ultimategdbot.api com.github.alex1304.ultimategdbot.api.utils com.github.alex1304.ultimategdbot.api.utils.reply -
-
Uses of Context in com.github.alex1304.ultimategdbot.api
Methods in com.github.alex1304.ultimategdbot.api with parameters of type Context Modifier and Type Method Description reactor.core.publisher.Mono<Void>
CommandErrorHandler. apply(reactor.core.publisher.Mono<Void> commandMono, Context ctx)
Applies the handler on the resulting Mono ofCommand.execute(Context)
.reactor.core.publisher.Mono<Void>
Command. execute(Context ctx)
Executes the commandreactor.core.publisher.Mono<Void>
CommandKernel. invokeCommand(Command cmd, Context ctx)
Invokes a command with the specified context.reactor.core.publisher.Mono<Boolean>
PermissionLevel. isGranted(Context ctx)
Whether the user is granted the permission to use the command.reactor.core.publisher.Mono<discord4j.core.object.entity.Message>
Bot. logStackTrace(Context ctx, Throwable t)
Prints a Throwable's stack trace in the log channel.Method parameters in com.github.alex1304.ultimategdbot.api with type arguments of type Context Modifier and Type Method Description <T extends Throwable>
voidCommandErrorHandler. addHandler(Class<T> errorClass, java.util.function.BiFunction<T,Context,reactor.core.publisher.Mono<Void>> handleAction)
Adds an error handler.static Command
Command. forkedFrom(Command other, java.util.function.Function<Context,reactor.core.publisher.Mono<Void>> executeFunc)
Creates a new Command instance which action is the provided function, and other attributes (alias, error actions, allowed channels, permission level, etc) are inherited from the given base command.static PermissionLevel
PermissionLevel. forSpecificRole(java.util.function.Function<Context,reactor.core.publisher.Mono<discord4j.core.object.util.Snowflake>> roleIdGetter)
Constructors in com.github.alex1304.ultimategdbot.api with parameters of type Context Constructor Description Context(Context parent, List<String> newArgs)
-
Uses of Context in com.github.alex1304.ultimategdbot.api.utils
Methods in com.github.alex1304.ultimategdbot.api.utils with parameters of type Context Modifier and Type Method Description static String
ArgUtils. concatArgs(Context ctx, int fromIndex)
Concatenates all arguments from the specified index to the end.static reactor.core.publisher.Mono<String>
BotUtils. generateDefaultDocumentation(Command cmd, Context ctx, String cmdName)
Generates a default documentation for the command in a String format.static int
ArgUtils. getArgAsInt(Context ctx, int index)
Gets the value of the argument at the specified index as int.static long
ArgUtils. getArgAsLong(Context ctx, int index)
Gets the value of the argument at the specified index as long.static void
ArgUtils. requireMinimumArgCount(Context ctx, int count)
Checks if the arguments of htis context has an argument count greater or equal to the given count.static void
ArgUtils. requireMinimumArgCount(Context ctx, int count, String errorMessage)
Checks if the arguments of htis context has an argument count greater or equal to the given count. -
Uses of Context in com.github.alex1304.ultimategdbot.api.utils.reply
Method parameters in com.github.alex1304.ultimategdbot.api.utils.reply with type arguments of type Context Modifier and Type Method Description void
ReplyMenuBuilder. addItem(String key, String view, java.util.function.Function<Context,reactor.core.publisher.Mono<Void>> action)
Constructors in com.github.alex1304.ultimategdbot.api.utils.reply with parameters of type Context Constructor Description PaginatedReplyMenuBuilder(Command cmd, Context ctx, boolean deleteOnReply, boolean deleteOnTimeout, int maxPageLength)
ReplyMenuBuilder(Context ctx, boolean deleteOnReply, boolean deleteOnTimeout)
-