Skip to content

Instantly share code, notes, and snippets.

@itsmefox
Last active November 25, 2022 10:29
Show Gist options
  • Save itsmefox/93bbb8f60bee0964b8881c3bb9316bdb to your computer and use it in GitHub Desktop.
Save itsmefox/93bbb8f60bee0964b8881c3bb9316bdb to your computer and use it in GitHub Desktop.
Create your Discord Bot with aluna-spring-boot-starter - BotReadyListener
@Component
class BotReadyListener : ApplicationListener<DiscordFirstShardReadyEvent> {
override fun onApplicationEvent(event: DiscordFirstShardReadyEvent) {
//Set the status of the bot as soon as possible
event.shardManager.setPresence(OnlineStatus.ONLINE, Activity.playing("I'm Ready"))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment