This repository has been archived by the owner on Jun 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bot now works with Admin and without.
- Loading branch information
Showing
4 changed files
with
59 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/com/jonteohr/discord/guardian/permission/PermissionErr.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.jonteohr.discord.guardian.permission; | ||
|
||
import com.jonteohr.discord.guardian.App; | ||
|
||
import net.dv8tion.jda.api.EmbedBuilder; | ||
import net.dv8tion.jda.api.Permission; | ||
import net.dv8tion.jda.api.entities.TextChannel; | ||
|
||
public class PermissionErr { | ||
public static void BotPerm(TextChannel channel) { | ||
EmbedBuilder msg = new EmbedBuilder(); | ||
|
||
msg.setColor(0xD52D42); | ||
msg.setAuthor("Permission error", null, "http://guardianbot.xyz/attention-clipart-warning-triangle-2.png"); | ||
msg.setDescription("I'm missing one or more permissions! Make sure I have the permissions listed down below, if not I will not work."); | ||
|
||
String srvPermList = ""; | ||
for(Permission perm : App.permissions) { | ||
srvPermList = srvPermList + perm.getName() + "\n"; | ||
} | ||
|
||
msg.addField("Server Permissions", srvPermList, false); | ||
|
||
channel.sendMessage(msg.build()).queue(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters