package com.nincraft.ninbot.command;

import com.nincraft.ninbot.util.MessageSenderHelper;
import com.nincraft.ninbot.util.Reference;
import lombok.val;
import net.dv8tion.jda.core.entities.Role;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;

import java.util.List;
import java.util.stream.Collectors;

public class ListCommand extends AbstractCommand {

    public ListCommand() {
        commandLength = 2;
        commandName = "list";
        commandDescription = "Displays available games for subscribing";
    }

    @Override
    public void execute(MessageReceivedEvent event) {
        val channel = event.getChannel();
        val roleList = event.getGuild().getRoles();
        List<String> roleNameList = roleList.stream().map(Role::getName).collect(Collectors.toList());
        roleNameList.removeAll(Reference.getRoleBlacklist());
        MessageSenderHelper.sendMessage(channel, "Available subscriptions");
        MessageSenderHelper.sendMessage(channel, roleNameList.toString());
    }
}

@@ -146,16 +146,158 @@
 ok.val;%0A
+import net.dv8tion.jda.core.entities.Guild;%0Aimport net.dv8tion.jda.core.entities.Member;%0Aimport net.dv8tion.jda.core.entities.MessageChannel;%0A
 import n
@@ -331,16 +331,16 @@
 s.Role;%0A
-
 import n
@@ -397,16 +397,46 @@
 Event;%0A%0A
+import java.util.Collections;%0A
 import j
@@ -829,35 +829,1106 @@
 val 
-roleList = event.getGuild()
+content = event.getMessage().getContent().split(%22 %22);%0A        if (content.length %3E 2) %7B%0A            listUsersInSubscription(content%5B2%5D, event);%0A        %7D else %7B%0A            listSubscriptions(event.getGuild(), channel);%0A        %7D%0A    %7D%0A%0A    private void listUsersInSubscription(String roleName, MessageReceivedEvent event) %7B%0A        val guild = event.getGuild();%0A        val role = guild.getRolesByName(roleName, true);%0A        val channel = event.getChannel();%0A        if (!role.isEmpty()) %7B%0A            val users = guild.getMembersWithRoles(role);%0A            List%3CString%3E userNames = users.stream().map(Member::getEffectiveName).collect(Collectors.toList());%0A            Collections.sort(userNames);%0A            MessageSenderHelper.sendMessage(channel, %22Users in %25s subscription%22, roleName);%0A            MessageSenderHelper.sendMessage(channel, userNames.toString());%0A        %7D else %7B%0A            MessageSenderHelper.sendMessage(channel, %22No subscription %25s found%22, roleName);%0A        %7D%0A    %7D%0A%0A    private void listSubscriptions(Guild guild, MessageChannel channel) %7B%0A        val roleList = guild
 .get

Add subscription list