-
This commit is contained in:
parent
e92ce9f11f
commit
afdd27e466
@ -38,7 +38,6 @@ public class BotListener extends ListenerAdapter {
|
||||
//On a detecter que c'etait une commande
|
||||
//System.out.println(event.getMessage().getContent());
|
||||
|
||||
|
||||
MainBot.handleCommand(MainBot.parser.parse(event.getMessage().getContent(), event));
|
||||
|
||||
|
||||
|
@ -3,12 +3,13 @@ package net.Broken;
|
||||
import net.Broken.Outils.CommandParser;
|
||||
import net.Broken.Outils.DayListener;
|
||||
import net.Broken.Outils.Redirection;
|
||||
import net.Broken.commandes.*;
|
||||
import net.Broken.commandes.Over18.*;
|
||||
import net.Broken.Commandes.*;
|
||||
import net.Broken.Commandes.Over18.*;
|
||||
import net.dv8tion.jda.core.AccountType;
|
||||
import net.dv8tion.jda.core.JDA;
|
||||
import net.dv8tion.jda.core.JDABuilder;
|
||||
import net.dv8tion.jda.core.OnlineStatus;
|
||||
import net.dv8tion.jda.core.entities.Game;
|
||||
import net.dv8tion.jda.core.entities.Guild;
|
||||
import net.dv8tion.jda.core.entities.Member;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
@ -69,7 +70,6 @@ public class MainBot {
|
||||
jda = new JDABuilder(AccountType.BOT).addListener(new BotListener()).setToken(args[0]).setBulkDeleteSplittingEnabled(false).buildBlocking();
|
||||
jda.setAutoReconnect(true);
|
||||
jda.addEventListener();
|
||||
jda.addEventListener();
|
||||
|
||||
okInit=true;
|
||||
|
||||
@ -84,6 +84,8 @@ public class MainBot {
|
||||
//Connection reussi
|
||||
if(okInit)
|
||||
{
|
||||
jda.getPresence().setGame(Game.of("Statut: Loading..."));
|
||||
jda.getTextChannels().forEach(textChannel -> textChannel.sendTyping().queue());
|
||||
/*************************************
|
||||
* Definition des commande *
|
||||
*************************************/
|
||||
@ -133,6 +135,8 @@ public class MainBot {
|
||||
/*List<User> userAction = serveur.getUsersByName("Broken_Fire");
|
||||
new Move().exc(userAction.get(0),"Big Daddy",true,serveur,serveur.getManager());*/
|
||||
Redirection urlRedirect=new Redirection();
|
||||
jda.getPresence().setGame(Game.of("Statut: Ok"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -153,7 +157,7 @@ public class MainBot {
|
||||
else
|
||||
{
|
||||
MessageReceivedEvent event = cmd.event;
|
||||
event.getTextChannel().sendMessage(event.getAuthor().getAsMention()+"\n:warning: **__Commande inconnue!__** :warning:\n:arrow_right: Utilisez `//help` pour voirs les commandes disponible. ").queue();
|
||||
event.getTextChannel().sendMessage(event.getAuthor().getAsMention()+"\n:warning: **__Commande inconnue!__** :warning:\n:arrow_right: Utilisez `//help` pour voirs les Commandes disponible. ").queue();
|
||||
logger.info("Commande inconnue");
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.Broken.Outils;
|
||||
|
||||
import net.Broken.MainBot;
|
||||
import net.Broken.commandes.Move;
|
||||
import net.Broken.Commandes.Move;
|
||||
import net.dv8tion.jda.core.entities.Guild;
|
||||
import net.dv8tion.jda.core.entities.Member;
|
||||
import net.dv8tion.jda.core.entities.Role;
|
||||
|
@ -1,5 +1,5 @@
|
||||
package net.Broken.Outils;
|
||||
import net.Broken.commandes.Spam;
|
||||
import net.Broken.Commandes.Spam;
|
||||
import net.dv8tion.jda.core.exceptions.RateLimitedException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user