Class UnsafeMessageCommand
-
- All Implemented Interfaces:
-
com.kotlindiscord.kord.extensions.koin.KordExKoinComponent,com.kotlindiscord.kord.extensions.types.Lockable,org.koin.core.component.KoinComponent
public final class UnsafeMessageCommand<M extends ModalForm> extends MessageCommand<UnsafeMessageCommandContext<M>, M>
Like a standard message command, but with less safety features.
-
-
Field Summary
Fields Modifier and Type Field Description private InitialMessageCommandResponseinitialResponseprivate final Function0<M>modalprivate BooleanallowByDefaultprivate BooleanallowInDmsprivate SuspendFunction2<UnsafeMessageCommandContext<M>, M, Unit>bodyprivate Stringbundleprivate final List<SuspendFunction1<CheckContextWithCache<MessageCommandInteractionCreateEvent>, 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 UnsafeMessageCommand(Extension extension, Function0<M> modal)
-
Method Summary
Modifier and Type Method Description final InitialMessageCommandResponsegetInitialResponse()Initial response type. final UnitsetInitialResponse(InitialMessageCommandResponse initialResponse)Initial response type. Function0<M>getModal()Unitcall(MessageCommandInteractionCreateEvent event, Map<String, Object> cache)UnitrespondText(UnsafeMessageCommandContext<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.message.MessageCommand
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
-
UnsafeMessageCommand
UnsafeMessageCommand(Extension extension, Function0<M> modal)
-
-
Method Detail
-
getInitialResponse
final InitialMessageCommandResponse getInitialResponse()
Initial response type. Change this to decide what happens when this message command action is executed.
-
setInitialResponse
final Unit setInitialResponse(InitialMessageCommandResponse initialResponse)
Initial response type. Change this to decide what happens when this message command action is executed.
-
respondText
Unit respondText(UnsafeMessageCommandContext<M> context, String message, FailureReason<?> failureType)
-
-
-
-