2-3 modifications très légères

Bump de la version
This commit is contained in:
2021-06-04 01:45:19 +02:00
parent f42c58d6cd
commit 92fab136f6
7 changed files with 5 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ import net.dv8tion.jda.api.entities.Activity;
import net.dv8tion.jda.api.utils.cache.CacheFlag; import net.dv8tion.jda.api.utils.cache.CacheFlag;
public class JdrBot { public class JdrBot {
public static String Version = "2.61"; public static String Version = "2.62";
public static JDA jda; public static JDA jda;
public static LocalDateTime basedate; public static LocalDateTime basedate;

View File

@@ -15,7 +15,6 @@ import net.dv8tion.jda.api.events.user.update.UserUpdateOnlineStatusEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter; import net.dv8tion.jda.api.hooks.ListenerAdapter;
public class JdrBotListener extends ListenerAdapter { public class JdrBotListener extends ListenerAdapter {
Random r = new Random(); Random r = new Random();
@Override @Override

View File

@@ -35,7 +35,6 @@ public class TrackScheduler extends AudioEventAdapter {
System.out.println("Launching track:"+track.getInfo().title); System.out.println("Launching track:"+track.getInfo().title);
} else { } else {
stop(); stop();
//am.closeAudioConnection();
} }
} }
} }

View File

@@ -15,7 +15,7 @@ public class Emote extends Command {
public void call(GuildMessageReceivedEvent e) { public void call(GuildMessageReceivedEvent e) {
String[] args = Arrays.copyOfRange(e.getMessage().getContentRaw().split(" "), 1, e.getMessage().getContentRaw().split(" ").length); String[] args = Arrays.copyOfRange(e.getMessage().getContentRaw().split(" "), 1, e.getMessage().getContentRaw().split(" ").length);
String str = (String)args[0]; String str = args[0];
if(str.matches("<:.*:\\d+>")) if(str.matches("<:.*:\\d+>"))
{ {
String id = str.replaceAll("<:.*:(\\d+)>", "$1"); String id = str.replaceAll("<:.*:(\\d+)>", "$1");

View File

@@ -12,7 +12,7 @@ import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
import net.dv8tion.jda.api.events.user.update.UserUpdateOnlineStatusEvent; import net.dv8tion.jda.api.events.user.update.UserUpdateOnlineStatusEvent;
public class LastTimeOnline extends Command { public class LastTimeOnline extends Command {
static HashMap<String, LocalDateTime> AllUsers = new HashMap<String, LocalDateTime>(); static HashMap<String, LocalDateTime> AllUsers = new HashMap<>();
public LastTimeOnline() { public LastTimeOnline() {
SetName("lasttimeonline|lto"); SetName("lasttimeonline|lto");

View File

@@ -18,7 +18,7 @@ public class FLoad extends Command {
@Override @Override
public void call(GuildMessageReceivedEvent e) { public void call(GuildMessageReceivedEvent e) {
if(e.getGuild().getMember(e.getAuthor()).getVoiceState().getChannel() != null) { if(e.getMember().getVoiceState().getChannel() != null) {
String args = StringUtils.join(Arrays.copyOfRange(e.getMessage().getContentRaw().split(" "), 1, e.getMessage().getContentRaw().split(" ").length), " "); String args = StringUtils.join(Arrays.copyOfRange(e.getMessage().getContentRaw().split(" "), 1, e.getMessage().getContentRaw().split(" ").length), " ");
e.getGuild().getAudioManager().openAudioConnection(e.getMember().getVoiceState().getChannel()); e.getGuild().getAudioManager().openAudioConnection(e.getMember().getVoiceState().getChannel());

View File

@@ -18,7 +18,7 @@ public class FLoadLoop extends Command {
@Override @Override
public void call(GuildMessageReceivedEvent e) { public void call(GuildMessageReceivedEvent e) {
if(e.getGuild().getMember(e.getAuthor()).getVoiceState().getChannel() != null) { if(e.getMember().getVoiceState().getChannel() != null) {
String args = StringUtils.join(Arrays.copyOfRange(e.getMessage().getContentRaw().split(" "), 1, e.getMessage().getContentRaw().split(" ").length)," "); String args = StringUtils.join(Arrays.copyOfRange(e.getMessage().getContentRaw().split(" "), 1, e.getMessage().getContentRaw().split(" ").length)," ");
e.getGuild().getAudioManager().openAudioConnection(e.getMember().getVoiceState().getChannel()); e.getGuild().getAudioManager().openAudioConnection(e.getMember().getVoiceState().getChannel());