TwitchLib.Client icon indicating copy to clipboard operation
TwitchLib.Client copied to clipboard

Third Party Emotes only resolve when message contains normal Twitch Emote

Open 0za0 opened this issue 1 year ago • 0 comments

Version: 4.0.0-preview-5677f50eb2a7544e1b9b136a0e1537abf5083385 Issue: Third Party Emotes such as the ones on BetterTwitchTv only get replaced when an official Twitch emote is also contained in the chat message.

Example Code:

        TwitchClient client;
        ConnectionCredentials credentials = new ConnectionCredentials("user", "token");
        client = new TwitchClient(protocol: ClientProtocol.WebSocket);
        client.Initialize(credentials, "channel");

        client.OnMessageReceived += (object? sender, OnMessageReceivedArgs e) =>
        {
            Console.WriteLine(e.ChatMessage.Message);
            Console.WriteLine(e.ChatMessage.EmoteReplacedMessage);
            return null;
        };
        client.WillReplaceEmotes = true;


        client.ChannelEmotes.Add(new MessageEmote("5d7eefb7c0652668c9e4d394", "modCheck", MessageEmote.EmoteSource.BetterTwitchTv));
        await client.ConnectAsync();
        Console.ReadLine();

Chat and Output: image image

Expected Result: Third Party Emotes should be able to get replaced in a message without the need for an official Twitch Emote.

If somebody has a workaround or if I'm using TwitchLib wrong please let me know!

0za0 avatar Jul 19 '24 20:07 0za0