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