Class UnsafeUserCommand
-
- All Implemented Interfaces:
-
com.kotlindiscord.kord.extensions.koin.KordExKoinComponent,com.kotlindiscord.kord.extensions.types.Lockable,org.koin.core.component.KoinComponent
public final class UnsafeUserCommand<M extends ModalForm> extends UserCommand<UnsafeUserCommandContext<M>, M>
Like a standard user command, but with less safety features.
-
-
Field Summary
Fields Modifier and Type Field Description private InitialUserCommandResponseinitialResponseprivate final Function0<M>modalprivate BooleanallowByDefaultprivate BooleanallowInDmsprivate SuspendFunction2<UnsafeUserCommandContext<M>, M, Unit>bodyprivate Stringbundleprivate final List<SuspendFunction1<CheckContextWithCache<UserCommandInteractionCreateEvent>, Unit>>checkListprivate final ComponentRegistrycomponentRegistryprivate PermissionsdefaultMemberPermissionsprivate final Extensionextensionprivate SnowflakeguildIdprivate final Kordkordprivate final Localized<String>localizedNameprivate Booleanlockingprivate Mutexmutexprivate Stringnameprivate final Map<Locale, String>nameTranslationCacheprivate final ApplicationCommandRegistryregistryprivate final Set<Permission>requiredPermsprivate final StringresolvedBundleprivate final SentryAdaptersentryprivate final ExtensibleBotBuildersettingsprivate final TranslationsProvidertranslationsProviderprivate final ApplicationCommandTypetype
-
Constructor Summary
Constructors Constructor Description UnsafeUserCommand(Extension extension, Function0<M> modal)
-
Method Summary
Modifier and Type Method Description final InitialUserCommandResponsegetInitialResponse()Initial response type. final UnitsetInitialResponse(InitialUserCommandResponse initialResponse)Initial response type. Function0<M>getModal()Unitcall(UserCommandInteractionCreateEvent event, Map<String, Object> cache)UnitrespondText(UnsafeUserCommandContext<M> context, String message, FailureReason<?> failureType)-
Methods inherited from class com.kotlindiscord.kord.extensions.commands.application.ApplicationCommand
check, check, doCall, getAllowByDefault, getAllowInDms, getCheckList, getDefaultMemberPermissions, getGuildId, getLocalizedName, getRegistry, getRequiredPerms, guild, guild, guild, localize, requireBotPermissions, requirePermission, runStandardChecks, setAllowByDefault, setAllowInDms, setDefaultMemberPermissions, setGuildId -
Methods inherited from class com.kotlindiscord.kord.extensions.commands.application.user.UserCommand
action, firstSentryBreadcrumb, getBody, getComponentRegistry, getType, handleError, runChecks, setBody, validate -
Methods inherited from class com.kotlindiscord.kord.extensions.commands.Command
checkBotPerms, emitEventAsync, getBundle, getExtension, getKord, getLocking, getMutex, getName, getNameTranslationCache, getResolvedBundle, getSentry, getSettings, getTranslationsProvider, setBundle, setLocking, setMutex, setName -
Methods inherited from class com.kotlindiscord.kord.extensions.koin.KordExKoinComponent
getKoin -
Methods inherited from class com.kotlindiscord.kord.extensions.types.Lockable
lock, unlock, withLock -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
UnsafeUserCommand
UnsafeUserCommand(Extension extension, Function0<M> modal)
-
-
Method Detail
-
getInitialResponse
final InitialUserCommandResponse getInitialResponse()
Initial response type. Change this to decide what happens when this user command action is executed.
-
setInitialResponse
final Unit setInitialResponse(InitialUserCommandResponse initialResponse)
Initial response type. Change this to decide what happens when this user command action is executed.
-
respondText
Unit respondText(UnsafeUserCommandContext<M> context, String message, FailureReason<?> failureType)
-
-
-
-