Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a new channel #20

Open
ghost opened this issue Apr 13, 2020 · 2 comments
Open

Creating a new channel #20

ghost opened this issue Apr 13, 2020 · 2 comments
Labels
question Further information is requested

Comments

@ghost
Copy link

ghost commented Apr 13, 2020

Hi.
I wanna create a new channel using ts3j but I can't find any way to executeCommand and receive a channel id. Let me know a solution please :).

public int createChannel(Map<ChannelProperty, String> channelPropertyStringMap) {
    SingleCommand singleCommand = new SingleCommand("channelcreate", ProtocolRole.CLIENT);
    channelPropertyStringMap.forEach((channelProperty, value) -> singleCommand.add(new CommandSingleParameter(channelProperty.getName(), value)));
    return localTeamspeakClientSocket.executeCommand(?).get();
}
@Manevolent Manevolent added the question Further information is requested label Apr 14, 2020
@Manevolent
Copy link
Owner

Manevolent commented Apr 14, 2020

I believe singleCommand should be the parameter for executeCommand. If I'm wrong, I apologize, I haven't been in this codebase for a while.

Due to the fact that TS3 was reverse engineered to accomplish TS3j in the first place, there are gaps in the understanding that the community had (at the time TS3j was originally written, anyway) that led to gaps in TS3j's functionality that still exists today. This is somewhat evident from the other few feature requests that exist in the form of issues on this project, as you can see.

I'd suggest trying keywords such as channeladd, as there are a few other commands "out there" that also follow the same format (*add).

If a solution is reached on this issue, I can get an issue created to include it in TS3j as a base method in the API.

@Flakebi
Copy link

Flakebi commented Apr 14, 2020

If it is about command arguments, I can help out, we have a list of them.
Your channel property names might not match with the names that the server expects for channelcreate.
In general, if you append return_code=<whatever> to a command, you get an answer that refers to that return_code (helpful to map answers to requests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants