currently work-in-progress bot for fluxer that is intended to have a bsky feed + listenbrainz integration and some other things that i haven't came up with yet
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Initial commit

Iva Schariac 93c9f531

+34
+34
build.java
··· 1 + import net.dv8tion.jda.api.JDA; 2 + import net.dv8tion.jda.api.JDABuilder; 3 + import net.dv8tion.jda.api.entities.Activity; 4 + import net.dv8tion.jda.api.requests.GatewayIntent; 5 + import net.dv8tion.jda.api.utils.cache.CacheFlag; 6 + 7 + import javax.security.auth.login.LoginException; 8 + 9 + public class CloverTheBot { 10 + public static void main(String[] args) throws LoginException { 11 + String token = "1474076459944636459.AS9XQlZhlGIZAP8WJT-cf7eBaqXkBSIvrYbDRMLHMQ8"; 12 + JDA jda = JDABuilder.createDefault(token) 13 + .enableIntents(GatewayIntent.MESSAGE_CONTENT) 14 + .disableCache(CacheFlag.VOICE_STATE) 15 + .setActivity(Activity.playing("Java Bot")) 16 + .build(); 17 + } 18 + } 19 + 20 + import net.dv8tion.jda.api.events.message.MessageReceivedEvent; 21 + import net.dv8tion.jda.api.hooks.ListenerAdapter; 22 + 23 + public class MessageListener extends ListenerAdapter { 24 + @Override 25 + public void onMessageReceived(MessageReceivedEvent event) { 26 + if (event.getAuthor().isBot()) return; 27 + String message = event.getMessage().getContentRaw(); 28 + if (message.equals("!meow")) { 29 + event.getChannel().sendMessage("meow").queue(); 30 + 31 + jda.addEventListener(new MessageListener()); 32 + } 33 + } 34 + }