v1.2.0 #399
2 changed files with 14 additions and 9 deletions
4
pom.xml
4
pom.xml
|
|
@ -66,7 +66,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.dv8tion</groupId>
|
<groupId>net.dv8tion</groupId>
|
||||||
<artifactId>JDA</artifactId>
|
<artifactId>JDA</artifactId>
|
||||||
<version>4.1.1_110</version>
|
<version>4.1.1_113</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.json</groupId>
|
<groupId>org.json</groupId>
|
||||||
|
|
@ -142,7 +142,7 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
<version>3.8.2</version>
|
<version>3.9.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import net.dv8tion.jda.api.EmbedBuilder;
|
||||||
import net.dv8tion.jda.api.Permission;
|
import net.dv8tion.jda.api.Permission;
|
||||||
import net.dv8tion.jda.api.entities.ChannelType;
|
import net.dv8tion.jda.api.entities.ChannelType;
|
||||||
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
|
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
|
||||||
|
import net.dv8tion.jda.api.exceptions.ErrorResponseException;
|
||||||
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
import net.dv8tion.jda.api.hooks.ListenerAdapter;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
@ -64,13 +65,17 @@ public class CommandListener extends ListenerAdapter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
e.getAuthor().openPrivateChannel().complete().sendMessage(new EmbedBuilder()
|
try {
|
||||||
.setTitle("No permission")
|
e.getAuthor().openPrivateChannel().complete().sendMessage(new EmbedBuilder()
|
||||||
.setDescription("I need the `MESSAGE EMBED LINKS` permission in order to work!")
|
.setTitle("No permission")
|
||||||
.setColor(Color.RED)
|
.setDescription("I need the `MESSAGE EMBED LINKS` permission in order to work!")
|
||||||
.setFooter("Hadder", "https://bigbotnetwork.com/images/Hadder.png")
|
.setColor(Color.RED)
|
||||||
.setTimestamp(Instant.now())
|
.setFooter("Hadder", "https://bigbotnetwork.com/images/Hadder.png")
|
||||||
.build()).queue();
|
.setTimestamp(Instant.now())
|
||||||
|
.build()).queue();
|
||||||
|
} catch (ErrorResponseException ex) {
|
||||||
|
e.getTextChannel().sendMessage("I need the `MESSAGE EMBED LINKS` permission in order to work!").queue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
e.getAuthor().openPrivateChannel().complete().sendMessage(new EmbedBuilder()
|
e.getAuthor().openPrivateChannel().complete().sendMessage(new EmbedBuilder()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue