Reorganization of packages
This commit is contained in:
parent
c8a13835b6
commit
5bb78e232e
@ -2,8 +2,8 @@ package net.Broken;
|
||||
|
||||
import net.Broken.Commands.Move;
|
||||
import net.Broken.Commands.Music;
|
||||
import net.Broken.Outils.AntiSpam;
|
||||
import net.Broken.Outils.Moderateur;
|
||||
import net.Broken.Tools.AntiSpam;
|
||||
import net.Broken.Tools.Moderateur;
|
||||
import net.dv8tion.jda.core.entities.ChannelType;
|
||||
import net.dv8tion.jda.core.entities.Guild;
|
||||
import net.dv8tion.jda.core.entities.Member;
|
||||
|
@ -2,7 +2,7 @@ package net.Broken.Commands;
|
||||
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.Outils.Redirection;
|
||||
import net.Broken.Tools.Redirection;
|
||||
import net.dv8tion.jda.core.entities.ChannelType;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.Broken.Commands;
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.Outils.EmbedMessageUtils;
|
||||
import net.Broken.Tools.EmbedMessageUtils;
|
||||
import net.dv8tion.jda.core.Permission;
|
||||
import net.dv8tion.jda.core.entities.Message;
|
||||
import net.dv8tion.jda.core.entities.MessageChannel;
|
||||
|
@ -2,9 +2,9 @@ package net.Broken.Commands;
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.MainBot;
|
||||
import net.Broken.Outils.EmbedMessageUtils;
|
||||
import net.Broken.Outils.MessageTimeOut;
|
||||
import net.Broken.Outils.PrivateMessage;
|
||||
import net.Broken.Tools.EmbedMessageUtils;
|
||||
import net.Broken.Tools.MessageTimeOut;
|
||||
import net.Broken.Tools.PrivateMessage;
|
||||
import net.dv8tion.jda.core.EmbedBuilder;
|
||||
import net.dv8tion.jda.core.entities.ChannelType;
|
||||
import net.dv8tion.jda.core.entities.Message;
|
||||
|
@ -2,8 +2,8 @@ package net.Broken.Commands;
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.MainBot;
|
||||
import net.Broken.Outils.EmbedMessageUtils;
|
||||
import net.Broken.Outils.MessageTimeOut;
|
||||
import net.Broken.Tools.EmbedMessageUtils;
|
||||
import net.Broken.Tools.MessageTimeOut;
|
||||
import net.dv8tion.jda.core.Permission;
|
||||
import net.dv8tion.jda.core.entities.*;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
|
@ -2,10 +2,9 @@ package net.Broken.Commands;
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.MainBot;
|
||||
import net.Broken.Outils.EmbedMessageUtils;
|
||||
import net.Broken.Outils.MessageTimeOut;
|
||||
import net.Broken.Tools.EmbedMessageUtils;
|
||||
import net.Broken.Tools.MessageTimeOut;
|
||||
import net.Broken.audio.AudioM;
|
||||
import net.dv8tion.jda.core.entities.Guild;
|
||||
import net.dv8tion.jda.core.entities.Message;
|
||||
import net.dv8tion.jda.core.entities.VoiceChannel;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package net.Broken.Commands.Over18;
|
||||
|
||||
import net.Broken.Outils.Command.NumberedCommande;
|
||||
import net.Broken.Tools.Command.NumberedCommande;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
package net.Broken.Commands.Over18;
|
||||
|
||||
import net.Broken.Outils.Command.NumberedCommande;
|
||||
import net.Broken.Tools.Command.NumberedCommande;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.Broken.Commands.Over18;
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.Outils.Redirection;
|
||||
import net.Broken.Tools.Redirection;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package net.Broken.Commands.Over18;
|
||||
|
||||
import net.Broken.Outils.Command.NumberedCommande;
|
||||
import net.Broken.Tools.Command.NumberedCommande;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.Broken.Commands.Over18;
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.Outils.Redirection;
|
||||
import net.Broken.Tools.Redirection;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -2,7 +2,7 @@ package net.Broken.Commands;
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.MainBot;
|
||||
import net.Broken.Outils.MessageTimeOut;
|
||||
import net.Broken.Tools.MessageTimeOut;
|
||||
import net.dv8tion.jda.core.entities.ChannelType;
|
||||
import net.dv8tion.jda.core.entities.Message;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
|
@ -2,10 +2,10 @@ package net.Broken.Commands;
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.MainBot;
|
||||
import net.Broken.Outils.AntiSpam;
|
||||
import net.Broken.Outils.EmbedMessageUtils;
|
||||
import net.Broken.Outils.MessageTimeOut;
|
||||
import net.Broken.Outils.UserSpamUtils;
|
||||
import net.Broken.Tools.AntiSpam;
|
||||
import net.Broken.Tools.EmbedMessageUtils;
|
||||
import net.Broken.Tools.MessageTimeOut;
|
||||
import net.Broken.Tools.UserSpamUtils;
|
||||
import net.dv8tion.jda.core.Permission;
|
||||
import net.dv8tion.jda.core.entities.Guild;
|
||||
import net.dv8tion.jda.core.entities.Member;
|
||||
|
@ -2,10 +2,10 @@ package net.Broken.Commands;
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.MainBot;
|
||||
import net.Broken.Outils.EmbedMessageUtils;
|
||||
import net.Broken.Outils.MessageTimeOut;
|
||||
import net.Broken.Outils.PrivateMessage;
|
||||
import net.Broken.Outils.UserSpamUtils;
|
||||
import net.Broken.Tools.EmbedMessageUtils;
|
||||
import net.Broken.Tools.MessageTimeOut;
|
||||
import net.Broken.Tools.PrivateMessage;
|
||||
import net.Broken.Tools.UserSpamUtils;
|
||||
import net.dv8tion.jda.core.EmbedBuilder;
|
||||
import net.dv8tion.jda.core.entities.ChannelType;
|
||||
import net.dv8tion.jda.core.entities.Message;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.Broken;
|
||||
|
||||
import net.Broken.Outils.Command.CommandLoader;
|
||||
import net.Broken.Outils.DayListener;
|
||||
import net.Broken.Tools.Command.CommandLoader;
|
||||
import net.Broken.Tools.DayListener;
|
||||
import net.dv8tion.jda.core.AccountType;
|
||||
import net.dv8tion.jda.core.JDA;
|
||||
import net.dv8tion.jda.core.JDABuilder;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package net.Broken;
|
||||
|
||||
import net.Broken.Outils.Command.CommandParser;
|
||||
import net.Broken.Outils.EmbedMessageUtils;
|
||||
import net.Broken.Outils.UserSpamUtils;
|
||||
import net.Broken.Tools.Command.CommandParser;
|
||||
import net.Broken.Tools.EmbedMessageUtils;
|
||||
import net.Broken.Tools.UserSpamUtils;
|
||||
import net.Broken.RestApi.ApiCommandLoader;
|
||||
import net.dv8tion.jda.core.JDA;
|
||||
import net.dv8tion.jda.core.entities.ChannelType;
|
||||
@ -17,6 +17,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
@ -74,6 +75,7 @@ public class MainBot {
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
ApiCommandLoader.load();
|
||||
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
package net.Broken.Outils;
|
||||
package net.Broken.Tools;
|
||||
|
||||
import net.Broken.MainBot;
|
||||
import net.Broken.Commands.Move;
|
||||
import net.Broken.Outils.EmbedMessageUtils;
|
||||
import net.Broken.Outils.MessageTimeOut;
|
||||
import net.Broken.Outils.UserSpamUtils;
|
||||
import net.dv8tion.jda.core.entities.*;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
import net.dv8tion.jda.core.exceptions.HierarchyException;
|
@ -1,4 +1,4 @@
|
||||
package net.Broken.Outils.Command;
|
||||
package net.Broken.Tools.Command;
|
||||
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.MainBot;
|
@ -1,4 +1,4 @@
|
||||
package net.Broken.Outils.Command;
|
||||
package net.Broken.Tools.Command;
|
||||
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
import org.apache.logging.log4j.LogManager;
|
@ -1,8 +1,8 @@
|
||||
package net.Broken.Outils.Command;
|
||||
package net.Broken.Tools.Command;
|
||||
import net.Broken.Commande;
|
||||
import net.Broken.Outils.FindContentOnWebPage;
|
||||
import net.Broken.Outils.LimitChecker;
|
||||
import net.Broken.Outils.Redirection;
|
||||
import net.Broken.Tools.FindContentOnWebPage;
|
||||
import net.Broken.Tools.LimitChecker;
|
||||
import net.Broken.Tools.Redirection;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
@ -1,4 +1,4 @@
|
||||
package net.Broken.Outils;
|
||||
package net.Broken.Tools;
|
||||
import net.Broken.Commands.Spam;
|
||||
import net.dv8tion.jda.core.exceptions.RateLimitedException;
|
||||
import org.apache.logging.log4j.LogManager;
|
@ -1,10 +1,8 @@
|
||||
package net.Broken.Outils;
|
||||
package net.Broken.Tools;
|
||||
|
||||
import net.dv8tion.jda.core.EmbedBuilder;
|
||||
import net.dv8tion.jda.core.entities.Member;
|
||||
import net.dv8tion.jda.core.entities.Message;
|
||||
import net.dv8tion.jda.core.entities.MessageEmbed;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
|
||||
import java.awt.*;
|
||||
|
@ -1,9 +1,8 @@
|
||||
package net.Broken.Outils;
|
||||
package net.Broken.Tools;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.Broken.Outils;
|
||||
package net.Broken.Tools;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
@ -1,4 +1,4 @@
|
||||
package net.Broken.Outils;
|
||||
package net.Broken.Tools;
|
||||
|
||||
import net.dv8tion.jda.core.entities.Message;
|
||||
import net.dv8tion.jda.core.exceptions.ErrorResponseException;
|
@ -1,5 +1,5 @@
|
||||
|
||||
package net.Broken.Outils;
|
||||
package net.Broken.Tools;
|
||||
|
||||
import net.Broken.MainBot;
|
||||
|
@ -1,10 +1,8 @@
|
||||
package net.Broken.Outils;
|
||||
package net.Broken.Tools;
|
||||
|
||||
import net.dv8tion.jda.core.entities.Message;
|
||||
import net.dv8tion.jda.core.entities.MessageEmbed;
|
||||
import net.dv8tion.jda.core.entities.PrivateChannel;
|
||||
import net.dv8tion.jda.core.entities.User;
|
||||
import net.dv8tion.jda.core.exceptions.RateLimitedException;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
@ -1,4 +1,4 @@
|
||||
package net.Broken.Outils;
|
||||
package net.Broken.Tools;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
14
src/main/java/net/Broken/Tools/UserManager/UserRegister.java
Normal file
14
src/main/java/net/Broken/Tools/UserManager/UserRegister.java
Normal file
@ -0,0 +1,14 @@
|
||||
package net.Broken.Tools.UserManager;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
|
||||
public class UserRegister {
|
||||
|
||||
|
||||
public String generateToken(){
|
||||
SecureRandom random = new SecureRandom();
|
||||
long longToken = Math.abs( random.nextLong() );
|
||||
String randomStr = Long.toString( longToken, 16 );
|
||||
return randomStr;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package net.Broken.Outils;
|
||||
package net.Broken.Tools;
|
||||
|
||||
import net.dv8tion.jda.core.entities.Member;
|
||||
import net.dv8tion.jda.core.entities.Message;
|
@ -9,15 +9,13 @@ import com.sedmelluq.discord.lavaplayer.track.AudioPlaylist;
|
||||
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
|
||||
import com.sedmelluq.discord.lavaplayer.track.AudioTrackInfo;
|
||||
import net.Broken.MainBot;
|
||||
import net.Broken.Outils.EmbedMessageUtils;
|
||||
import net.Broken.Outils.MessageTimeOut;
|
||||
import net.Broken.Tools.EmbedMessageUtils;
|
||||
import net.Broken.Tools.MessageTimeOut;
|
||||
import net.dv8tion.jda.core.entities.Guild;
|
||||
import net.dv8tion.jda.core.entities.Message;
|
||||
import net.dv8tion.jda.core.entities.TextChannel;
|
||||
import net.dv8tion.jda.core.entities.VoiceChannel;
|
||||
import net.dv8tion.jda.core.events.guild.voice.GuildVoiceLeaveEvent;
|
||||
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
|
||||
import net.dv8tion.jda.core.managers.AudioManager;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -2,24 +2,34 @@
|
||||
<Configuration status="error" packages="com.coralogix.sdk.appenders">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss.SSS}][%-5level][%-30.30c{1.}]: %msg%n" />
|
||||
<!--<PatternLayout pattern="[%d{HH:mm:ss.SSS}][%-5level][%-30.30c{1.}]: %msg%n" />-->
|
||||
<PatternLayout>
|
||||
<Pattern>[%d{HH:mm:ss.SSS}]%highlight{[%-5level]}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}[%-30.30c{1.}]: %highlight{%msg%n}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}</Pattern>
|
||||
</PatternLayout>
|
||||
</Console>
|
||||
<RollingFile name="RollingFile" fileName="./logs/curent.log"
|
||||
filePattern="./logs/$${date:yyyy-MM}/discordBot-%d{yyyy-MM-dd-HH}-%i.log.gz">
|
||||
<RollingFile name="RollingFile" fileName="./logs/current-day.log"
|
||||
filePattern="./logs/$${date:yyyy-MM}/discordBot-%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<PatternLayout>
|
||||
<Pattern>[%d{HH:mm:ss.SSS}]%highlight{[%-5level]}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}[%-30.30c{1.}]: %highlight{%msg%n}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}</Pattern>
|
||||
</PatternLayout>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy/>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
<SizeBasedTriggeringPolicy size="250 MB"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="60" />
|
||||
</RollingFile>
|
||||
<File name="current" fileName="logs/current.log" append="false">
|
||||
<PatternLayout>
|
||||
<Pattern>[%d{HH:mm:ss.SSS}]%highlight{[%-5level]}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}[%-30.30c{1.}]: %highlight{%msg%n}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}</Pattern>
|
||||
</PatternLayout>
|
||||
</File>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="RollingFile" level="info" />
|
||||
<AppenderRef ref="Console" level="info"/>
|
||||
<AppenderRef ref="RollingFile" level="info"/>
|
||||
<AppenderRef ref="current" level="info"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
Loading…
Reference in New Issue
Block a user