Skip to content

Commit

Permalink
Fix initialization with 7TV disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
TETYYS committed Jan 27, 2022
1 parent 9c9473e commit 593197f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MessageHeightTwitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ public MessageHeightTwitch(string Channel, string ChannelId, int TimeoutMs, bool
if (Enable7TVEmotes) {
SevenTVEmoteProvider = new SevenTVEmoteProvider();
SevenTVEmoteProvider.Initialize(ChannelId, cts.Token).GetAwaiter().GetResult();
SevenTVGetEmote = SevenTVEmoteProvider.TryGetEmote;
} else {
SevenTVGetEmote = (string __, out SizeF _) => { _ = default; return false; };
}
TwitchEmotes = new TwitchEmotes();
this.SevenTVGetEmote = SevenTVEmoteProvider.TryGetEmote;
this.BTTVGetEmote = BTTVEmoteProvider.TryGetEmote;
this.FFZGetEmote = FFZEmoteProvider.TryGetEmote;
this.TwitchGetEmote = TwitchEmotes.GetEmote;
Expand Down

0 comments on commit 593197f

Please sign in to comment.