*
This commit is contained in:
parent
cda8c1cc47
commit
182edf58f4
@ -22,6 +22,7 @@ import net.dv8tion.jda.core.hooks.ListenerAdapter;
|
||||
import net.dv8tion.jda.core.managers.GuildManager;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -35,6 +36,8 @@ public class BotListener extends ListenerAdapter {
|
||||
AntiSpam antispam=new AntiSpam();
|
||||
Moderateur modo = new Moderateur();
|
||||
Logger logger = LogManager.getLogger();
|
||||
@Value("${name}")
|
||||
public String test;
|
||||
|
||||
|
||||
@Override
|
||||
@ -93,7 +96,7 @@ public class BotListener extends ListenerAdapter {
|
||||
public void onMessageReceived(MessageReceivedEvent event) {
|
||||
// ----------------------Test pour eviter eco de commande-------------------------
|
||||
|
||||
|
||||
logger.info(test);
|
||||
if (event.getMessage().getContent().startsWith("//") && !event.getMessage().getAuthor().getId().equals(event.getJDA().getSelfUser().getId())) {
|
||||
//On a detecter que c'etait une commande
|
||||
//System.out.println(event.getMessage().getContent());
|
||||
|
@ -25,8 +25,7 @@ import java.util.HashMap;
|
||||
@SpringBootApplication
|
||||
public class MainBot {
|
||||
|
||||
@Value("${name}")
|
||||
public static String test;
|
||||
|
||||
public static final CommandParser parser =new CommandParser();
|
||||
public static HashMap<String, Commande> commandes = new HashMap<>();
|
||||
public static HashMap<User, ArrayList<Message>> historique =new HashMap<>();
|
||||
@ -73,7 +72,7 @@ public class MainBot {
|
||||
}));
|
||||
}
|
||||
|
||||
logger.info(test);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user