Implement basic permission check for message commands
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-22 17:08:31 +01:00
parent 11e4a07698
commit 655840dc82
6 changed files with 77 additions and 26 deletions

View File

@@ -1,10 +1,12 @@
package wtf.beatrice.hidekobot.commands.message;
import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import wtf.beatrice.hidekobot.objects.commands.MessageCommand;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
public class HelloCommand implements MessageCommand
{
@@ -14,6 +16,9 @@ public class HelloCommand implements MessageCommand
return new LinkedList<>(Arrays.asList("hi", "hello", "heya"));
}
@Override
public List<Permission> getPermissions() { return null; }
@Override
public boolean passRawArgs() {
return false;