@@ -0,0 +1,1631 @@
+package com.nincraft.ninbot.components.twitch;%0A%0Aimport com.nincraft.ninbot.components.command.AbstractCommand;%0Aimport com.nincraft.ninbot.components.config.ConfigService;%0Aimport com.nincraft.ninbot.util.MessageUtils;%0Aimport lombok.val;%0Aimport net.dv8tion.jda.core.events.message.MessageReceivedEvent;%0Aimport org.springframework.stereotype.Component;%0A%0A@Component%0Apublic class TwitchCommand extends AbstractCommand %7B%0A%0A    private ConfigService configService;%0A%0A    public TwitchCommand(ConfigService configService) %7B%0A        name = %22twitch%22;%0A        description = %22Access Twitch related commands%5Cn - %5C%22twitch announce%5C%22 toggles your Twitch going live announcement%22;%0A        length = 2;%0A        this.configService = configService;%0A    %7D%0A%0A    @Override%0A    protected void executeCommand(MessageReceivedEvent event) %7B%0A        switch (getSubcommand(event.getMessage().getContentStripped())) %7B%0A            case %22announce%22:%0A                announceToggle(event);%0A                break;%0A            default:%0A                break;%0A        %7D%0A    %7D%0A%0A    private void announceToggle(MessageReceivedEvent event) %7B%0A        val userId = event.getAuthor().getId();%0A        val serverId = event.getGuild().getId();%0A        val configName = %22streamingAnnounceUsers%22;%0A        val streamingAnnounceUsers = configService.getValuesByName(serverId, configName);%0A        if (streamingAnnounceUsers.contains(userId)) %7B%0A            configService.removeConfig(serverId, configName, userId);%0A        %7D else %7B%0A            configService.addConfig(serverId, configName, userId);%0A        %7D%0A        MessageUtils.reactSuccessfulResponse(event.getMessage());%0A    %7D%0A%7D%0A

Add Twitch command