Home:
/
:discord://-/
- friends:
discord://-/channels/@me/
- nitro:
discord://-/store
General:
class BasicBotApplication { | |
companion object { | |
@JvmStatic | |
fun main(args: Array<String>) { | |
val token = "" | |
//Create a new JDA instance | |
val jda = JDABuilder.createDefault(token).build() |
class BasicBotApplication { | |
companion object { | |
@JvmStatic | |
fun main(args: Array<String>) { | |
val token = "" | |
//Create a new JDA instance | |
val jda = JDABuilder.createDefault(token) | |
.addEventListeners(PingCommand()) | |
.build() |
class PingCommand : ListenerAdapter() { | |
private val logger: Logger = LoggerFactory.getLogger(javaClass) | |
//This gets called when a slash command gets used. | |
override fun onSlashCommandInteraction(event: SlashCommandInteractionEvent) { | |
//Check if this is our /ping command | |
if (event.name == "ping") { | |
logger.info("Command /ping got used") |
public class Application { | |
public static void main(String[] args) throws LoginException { | |
String token = ""; | |
//Create a new JDA instance | |
JDA jda = JDABuilder.createDefault(token).build(); | |
//Set the activity to "I'm Ready" | |
jda.getPresence().setActivity(Activity.playing("I'm Ready")); |
public class Application { | |
public static void main(String[] args) throws LoginException { | |
String token = ""; | |
//Create a new JDA instance | |
JDA jda = JDABuilder.createDefault(token) | |
.addEventListeners(new PingCommand()) //Register our /ping Command | |
.build(); |
public class PingCommand extends ListenerAdapter { | |
private Logger logger = LoggerFactory.getLogger(this.getClass()); | |
//This gets called when a slash command gets used. | |
@Override | |
public void onSlashCommandInteraction(@NotNull SlashCommandInteractionEvent event) { | |
//Check if this is our /ping command | |
if (event.getName().equals("ping")) { | |
logger.info("Command /ping got used"); |
@SpringBootApplication | |
open class BotApplication { | |
companion object { | |
@JvmStatic | |
fun main(args: Array<String>) { | |
runApplication<BotApplication>(*args) | |
} | |
} | |
} |
aluna: | |
discord: | |
application-id: | |
token: | |
logging: | |
level: | |
io.viascom.discord.bot.aluna.AlunaAutoConfiguration: DEBUG | |
io.viascom.discord.bot.aluna.SlashCommandInteractionInitializer: DEBUG | |
io.viascom.discord.bot.aluna.ListenerRegistration: DEBUG |
_ _ ____ _ _ ____ _ | |
/ \ | |_ _ _ __ __ _ | _ \(_)___ ___ ___ _ __ __| | | __ ) ___ | |_ | |
/ _ \ | | | | | '_ \ / _` | | | | | / __|/ __/ _ \| '__/ _` | | _ \ / _ \| __| | |
/ ___ \| | |_| | | | | (_| | | |_| | \__ \ (_| (_) | | | (_| | | |_) | (_) | |_ | |
/_/ \_\_|\__,_|_| |_|\__,_| |____/|_|___/\___\___/|_| \__,_| |____/ \___/ \__| | |
Aluna: 0.0.32_5.0.0-alpha.22-SNAPSHOT | |
Spring-Boot: 2.7.0 | |
JDA: 5.0.0-alpha.22 |