Auf Thema antworten

Ich danke dir!


Ich habe das ganze nun noch ein wenig an meine Bedürfnisse angepasst. Funktioniert so einwandfrei


[code=Java]

public int botCurrentChannelID(){

        HashMap<String, String> dataWhoAmI = doCommand("whoami");

        String response = dataWhoAmI.get("response");

       

            Matcher matcher = Pattern.compile("client_channel_id=(\\d+)").matcher(response);

            if (matcher.find()) {

                return Integer.parseInt(matcher.group(1));

            } else {

                return 0;

            }

        }

[/code]



Oben