mirror of
https://github.com/Noratrieb/killua-bot.git
synced 2026-01-16 16:15:03 +01:00
fixed print
This commit is contained in:
parent
13b7ce8a0c
commit
b488aeef15
6 changed files with 7 additions and 12 deletions
|
|
@ -13,7 +13,7 @@ public class Config {
|
||||||
public static final String NORMAL_PREFIX = "kil ";
|
public static final String NORMAL_PREFIX = "kil ";
|
||||||
public static final String L_PREFIX = "k ";
|
public static final String L_PREFIX = "k ";
|
||||||
|
|
||||||
public static final String PREFIX = L_PREFIX;
|
public static final String PREFIX = NORMAL_PREFIX;
|
||||||
|
|
||||||
public static final Color DEFAULT_COLOR = new Color(229, 201, 255);
|
public static final Color DEFAULT_COLOR = new Color(229, 201, 255);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -134,8 +134,7 @@ public class TriviaCommand extends Command {
|
||||||
new TriviaApproval(event, new TriviaQuestion(answers));
|
new TriviaApproval(event, new TriviaQuestion(answers));
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
System.out.println(ConsoleColors.BLUE_BOLD + "[TriviaCommand.AddSection 139] Received Next Message: "
|
System.out.println(ConsoleColors.BLUE_BOLD + "[TriviaCommand.AddSection 139] Received Next Message. status: " + status + ConsoleColors.RESET);
|
||||||
+ text + " status: " + status + ConsoleColors.RESET);
|
|
||||||
answers[status] = event.getMessage().getContentRaw();
|
answers[status] = event.getMessage().getContentRaw();
|
||||||
if (status >= 3) {
|
if (status >= 3) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ import java.util.Scanner;
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) throws LoginException {
|
public static void main(String[] args) throws LoginException {
|
||||||
JDABuilder builder = JDABuilder.createDefault(Secrets.L_TOKEN);
|
JDABuilder builder = JDABuilder.createDefault(Secrets.TOKEN);
|
||||||
builder.setCompression(Compression.ZLIB);
|
builder.setCompression(Compression.ZLIB);
|
||||||
builder.setActivity(Activity.watching("over Gon"));
|
builder.setActivity(Activity.watching("over Gon"));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.github.nilstrieb.core.command;
|
package com.github.nilstrieb.core.command;
|
||||||
|
|
||||||
import com.github.nilstrieb.core.command.CommandHandler;
|
|
||||||
import com.github.nilstrieb.util.ConsoleColors;
|
import com.github.nilstrieb.util.ConsoleColors;
|
||||||
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
|
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
|
||||||
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
||||||
|
|
@ -10,8 +9,7 @@ public class CommandListener extends ListenerAdapter {
|
||||||
@Override
|
@Override
|
||||||
public void onMessageReceived(@NotNull MessageReceivedEvent event) {
|
public void onMessageReceived(@NotNull MessageReceivedEvent event) {
|
||||||
if (!event.getAuthor().isBot()) {
|
if (!event.getAuthor().isBot()) {
|
||||||
System.out.println(ConsoleColors.CYAN + "[CListener 13] Received message: '" +
|
System.out.println(ConsoleColors.CYAN + "[CListener 13] Received message." + ConsoleColors.RESET);
|
||||||
event.getMessage().getContentRaw() + "' by " + event.getAuthor().getAsTag() + ConsoleColors.RESET);
|
|
||||||
CommandHandler.call(event);
|
CommandHandler.call(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@ public class ReactionEventManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onReactionAdd(MessageReactionAddEvent event){
|
public static void onReactionAdd(MessageReactionAddEvent event){
|
||||||
System.out.println(ConsoleColors.PURPLE + "[ReactionEventManager 21] Reaction added: " + event.getReactionEmote() +
|
System.out.println(ConsoleColors.PURPLE + "[ReactionEventManager 21] Reaction added: " + event.getReactionEmote() + ConsoleColors.RESET);
|
||||||
" by " + event.getUser().getAsTag() + ConsoleColors.RESET);
|
|
||||||
long message = event.getMessageIdLong();
|
long message = event.getMessageIdLong();
|
||||||
ReactionListener listener = currentReactions.get(message);
|
ReactionListener listener = currentReactions.get(message);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
|
|
@ -28,8 +27,7 @@ public class ReactionEventManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onReactionRemove(MessageReactionRemoveEvent event){
|
public static void onReactionRemove(MessageReactionRemoveEvent event){
|
||||||
System.out.println(ConsoleColors.PURPLE + "[ReactionEventManager 31] Reaction removed: " + event.getReactionEmote() +
|
System.out.println(ConsoleColors.PURPLE + "[ReactionEventManager 31] Reaction removed: " + event.getReactionEmote() + ConsoleColors.RESET);
|
||||||
" by " + event.getUser().getAsTag() + ConsoleColors.RESET);
|
|
||||||
long message = event.getMessageIdLong();
|
long message = event.getMessageIdLong();
|
||||||
ReactionListener listener = currentReactions.get(message);
|
ReactionListener listener = currentReactions.get(message);
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ public class ChannelMessageEventManager {
|
||||||
//if the message is relevant
|
//if the message is relevant
|
||||||
if (listeners.containsKey(id)) {
|
if (listeners.containsKey(id)) {
|
||||||
System.out.println(ConsoleColors.YELLOW + "[ChannelMsgEvtMgr 30] Message in listened channel " +
|
System.out.println(ConsoleColors.YELLOW + "[ChannelMsgEvtMgr 30] Message in listened channel " +
|
||||||
event.getTextChannel().getName() + " by " + event.getAuthor().getAsTag() + ": " + event.getMessage().getContentRaw() + ConsoleColors.RESET);
|
event.getTextChannel().getName() + ConsoleColors.RESET);
|
||||||
|
|
||||||
//notify all listeners
|
//notify all listeners
|
||||||
List<ChannelListener> list = listeners.get(id);
|
List<ChannelListener> list = listeners.get(id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue