TwitchLib / TwitchLib.Unity

TwitchLib repository representing all code belonging to the implementation of TwitchLib for Unity. Maintained primarily by LuckyNoS7evin.
164 stars 33 forks source link

Connecting, but no messages are being found #55

Closed calico-crusade closed 3 years ago

calico-crusade commented 4 years ago

Using TwitchLib.Unity in a Unity Project: v2018.4.22.3367679

It is connecting, the bot can send messages at any point during the application's life cycle , but OnMessageReceived and OnChatCommandReceived are not being fired.

            var creds = new ConnectionCredentials("username", "oauthtoken");

            _client = new Client();

            _client.Initialize(creds, "username");

            _client.OnConnected += _client_OnConnected;
            _client.OnJoinedChannel += _client_OnJoinedChannel;
            _client.OnMessageReceived += _client_OnMessageReceived;
            _client.OnDisconnected += _client_OnDisconnected;
            _client.OnNoPermissionError += _client_OnNoPermissionError;
            _client.OnConnectionError += _client_OnConnectionError;

            _client.Connect();
msklywenn commented 4 years ago

OS: Windows 10 64bits Unity: 2019.2 TwitchLib.Unity: 1.0.0 RC Release dll OnChatCommandReceived is fired in the editor but not in builds

MrPurple6411 commented 3 years ago

OS: Windows 10 64bit Unity: v2019.4.10.5444019 TwitchLib.Unity: 1.0.0 RC Release dll

the following will not trigger. _client.OnMessageReceived _client.OnChatCommandReceived

the following work fine. _client.OnConnected _client.OnJoinedChannel _client.SendMessage

swiftyspiffy commented 3 years ago

I don't really know about the Unity release, but if you join the Discord for this library, I believe someone has relatively recently updated the TwitchLib.Unity build with the latest changes and it is working.

swiftyspiffy commented 3 years ago

Using the latest TwitchLib.Unity release, I see both OnMessageReceived and OnChatCommandReceived firing as expected. CLosing this. Feel free to reopen if needed.