All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.freya022.botcommands.api.modals.Modals Maven / Gradle / Ivy

Go to download

A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.

There is a newer version: 3.0.0-alpha.18
Show newest version
package io.github.freya022.botcommands.api.modals;

import io.github.freya022.botcommands.api.core.service.annotations.InjectedService;
import io.github.freya022.botcommands.api.modals.annotations.ModalInput;
import net.dv8tion.jda.api.interactions.components.text.TextInputStyle;
import org.jetbrains.annotations.NotNull;

/**
 * Methods for modals and modal inputs
 */
@InjectedService
public interface Modals {
	/**
	 * Creates a new modal with the specified handler name, and the passed user data
	 *
	 * @param title The title of the modal
	 *
	 * @return The new ModalBuilder
	 */
	@NotNull
	ModalBuilder create(@NotNull String title);

	/**
	 * Creates a new text input component
	 *
	 * @param inputName The name of the input, must match a {@link ModalInput}
	 * @param label     The label to display on top of the text field
	 * @param style     The style of the text field
	 *
	 * @return The new TextInputBuilder
	 */
	@NotNull
	TextInputBuilder createTextInput(@NotNull String inputName, @NotNull String label, @NotNull TextInputStyle style);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy