Check out example codes for "discord jda acl check". It will help you in understanding the concepts better.

Code Example 1

public boolean checkAuthorization(MessageReceivedEvent event)  {
        try  {
            String id = event.getAuthor().getId();
            List<String> config = Files.readAllLines(Paths.get("src/main/resources/config.txt"));
            if(config.size() == 2)  return true;
            for(int i = 2; i<config.size(); i++)  {
                if(config.get(i).equals(id))  return true;
            }
            return false;
        }catch(Exception e)  {
            return false;
        }
    }

Learn ReactJs, React Native from akashmittal.com