Fixed bug with permissions
This commit is contained in:
parent
d4f6a52d44
commit
c6b613eae6
@ -170,6 +170,7 @@ public class MessageEvent {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onReact(MessageReactionAddEvent event) {
|
||||
try {
|
||||
Message message = event.getChannel().getMessageById(event.getMessageId()).complete();
|
||||
if (message == null || message.getEmbeds().size() != 1) return;
|
||||
MessageEmbed embed = message.getEmbeds().get(0);
|
||||
@ -185,6 +186,10 @@ public class MessageEvent {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (PermissionException pex) {
|
||||
if (pex.getPermission() == Permission.MESSAGE_READ) return;
|
||||
pex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
Loading…
Reference in New Issue
Block a user