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

Unity stops listening to chat commands #51

Open
thmsndk opened this issue Feb 29, 2020 · 6 comments
Open

Unity stops listening to chat commands #51

thmsndk opened this issue Feb 29, 2020 · 6 comments

Comments

@thmsndk
Copy link

thmsndk commented Feb 29, 2020

Unity Version: 2019.2.5f1
Running with release 1.0.0 of twitchlib.unity in the standalone player i'm experiencing issues with the chat commands, the first few seconds after connecting it responds to commands written in chat. e.g. !commands or !help and the likes.

The bot appears to be connected to the chat, and can send messages to it, but it seems like the client.OnChatCommandReceived event is no longer fireing. as if the client loses the subscriptions for the event?

@swiftyspiffy
Copy link
Member

swiftyspiffy commented Mar 12, 2020

Hi. Sorry about the delay.

You might try setting the client protocol to TCP, this has been used several times to resolve the apparent disconnect after several seconds of being connected correctly:

client = new TwitchClient(protocol: TwitchLib.Client.Enums.ClientProtocol.TCP);

@thmsndk
Copy link
Author

thmsndk commented Mar 13, 2020

@swiftyspiffy hmm the Client i'm initializing does not take any parameters, and is called Client

e.g.

client = new Client();
client.Initialize(credentials, channel_name);

Am I supposed to download the repository and build the code myself instead of using the latest release? I followed a guide where I downloaded the compiled .dll from the release page and included in unity.

@swiftyspiffy
Copy link
Member

The highest number isn't the most recent version, I don't think (the CI is broken and publishing incorrect versions). It might be worth it to just clone the repo and build the dev branch to get the latest code. I think the above code snippet should fix your problem.

@thmsndk
Copy link
Author

thmsndk commented Mar 18, 2020

@swiftyspiffy I cloned the master branch and built it, without any code changes, seems to be stable so far. but i'd have to do some more testing.

The Client class from TwitchLib.Unity has no constructor though :) so it is not possible to set thoose parameters as far as I can tell.

@supersessie
Copy link

Any chance of uploading a .dll file? I am having the same issue right now and I can't get the project to build...

@Lock-The-Door
Copy link

Recently I've managed to get the built version working by using .NET 4.8+ with the current dlls

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

No branches or pull requests

4 participants