question: public static void checkPermissions ( IUser user , IGuild guild , EnumSet < Permissions > required ) throws MissingPermissionsException { try { EnumSet < Permissions > contained = EnumSet . noneOf ( Permissions . class ) ; List < IRole > roles = user . getRolesForGuild ( guild ) ; for ( IRole role : roles ) { contained . addAll ( role . getPermissions ( ) ) ; } checkPermissions ( contained , required ) ; } catch ( UnsupportedOperationException e ) { } }
target:  Checks a set of permissions provided by a guild against required permissions.