Closed ghost closed 5 years ago
Main.api.editChannel(c.getChannelId(), ChannelProperty.CHANNEL_CODEC, "Opus Musik");
The server expects an ID that corresponds to some codec, not the name of that codec. We've provided the Codec enum for that purpose - though I must admit the current implementation kinda doesn't lend itself to be used in editChannel
...
Your code then becomes
String codecId = Integer.toString(Codec.OPUS_MUSIC.getIndex());
Main.api.editChannel(c.getChannelId(), ChannelProperty.CHANNEL_CODEC, codecId);
That should hopefully get rid of that convert error 😄
Hey,
thanks for your helpful response. The "bug" is now fixed and the bot works successfully. :)
Awesome, glad to hear that 😄
I tried to register a new bot command for editting a channel by the bot. The channel properties "Codec" and "Quality" should be changed by the bot when receiving a message.
`@Override public void onTextMessage(TextMessageEvent e) {
But the bot returns the following error message:
`2019-08-31 13:33:45.500 [DEBUG] TS3 command error: {msg=convert error, id=1540} 2019-08-31 13:33:45.507 [ERROR] Event listener threw an exception com.github.theholywaffle.teamspeak3.api.exception.TS3CommandFailedException: A "channeledit" command returned with a server error.
Please help me or comment my mistake(s).