Uses of Interface
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 that return Context Modifier and Type Method Description Context
Context. fork(List<String> newArgs)
Creates a new Context that is an exact copy of this one, but with different arguments.Methods in com.github.alex1304.ultimategdbot.api that return types with arguments of type Context Modifier and Type Method Description Map<Class<? extends Throwable>,java.util.function.BiConsumer<Throwable,Context>>
Command. getErrorActions()
Allows to define an action to execute according to the type of error emitted when executing this command.Methods in com.github.alex1304.ultimategdbot.api with parameters of type Context Modifier and Type Method Description 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.String
CommandKernel. openReplyMenu(Context ctx, discord4j.core.object.entity.Message msg, Map<String,java.util.function.Function<Context,reactor.core.publisher.Mono<Void>>> menuItems, boolean deleteOnReply, boolean deleteOnTimeout)
Opens a new reply menu with the given items.Method parameters in com.github.alex1304.ultimategdbot.api with type arguments of type Context Modifier and Type Method Description 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)
String
CommandKernel. openReplyMenu(Context ctx, discord4j.core.object.entity.Message msg, Map<String,java.util.function.Function<Context,reactor.core.publisher.Mono<Void>>> menuItems, boolean deleteOnReply, boolean deleteOnTimeout)
Opens a new reply menu with the given items. -
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)
-