diff --git a/src/providers/bttv/BttvEmotes.cpp b/src/providers/bttv/BttvEmotes.cpp
index 3b3c0d234..36481dd7c 100644
--- a/src/providers/bttv/BttvEmotes.cpp
+++ b/src/providers/bttv/BttvEmotes.cpp
@@ -13,6 +13,9 @@
namespace chatterino {
namespace {
+
+ QString emoteLinkFormat("https://betterttv.com/emotes/%1");
+
Url getEmoteLink(QString urlTemplate, const EmoteId &id,
const QString &emoteScale)
{
@@ -47,13 +50,14 @@ namespace {
auto name =
EmoteName{jsonEmote.toObject().value("code").toString()};
- auto emote = Emote(
- {name,
- ImageSet{Image::fromUrl(getEmoteLinkV3(id, "1x"), 1),
- Image::fromUrl(getEmoteLinkV3(id, "2x"), 0.5),
- Image::fromUrl(getEmoteLinkV3(id, "3x"), 0.25)},
- Tooltip{name.string + "
Global BetterTTV Emote"},
- Url{"https://manage.betterttv.net/emotes/" + id.string}});
+ auto emote = Emote({
+ name,
+ ImageSet{Image::fromUrl(getEmoteLinkV3(id, "1x"), 1),
+ Image::fromUrl(getEmoteLinkV3(id, "2x"), 0.5),
+ Image::fromUrl(getEmoteLinkV3(id, "3x"), 0.25)},
+ Tooltip{name.string + "
Global BetterTTV Emote"},
+ Url{emoteLinkFormat.arg(id.string)},
+ });
emotes[name] =
cachedOrMakeEmotePtr(std::move(emote), currentEmotes);
@@ -75,15 +79,16 @@ namespace {
auto name = EmoteName{jsonEmote.value("code").toString()};
// emoteObject.value("imageType").toString();
- auto emote = Emote(
- {name,
- ImageSet{
- Image::fromUrl(getEmoteLinkV3(id, "1x"), 1),
- Image::fromUrl(getEmoteLinkV3(id, "2x"), 0.5),
- Image::fromUrl(getEmoteLinkV3(id, "3x"), 0.25),
- },
- Tooltip{name.string + "
Channel BetterTTV Emote"},
- Url{"https://manage.betterttv.net/emotes/" + id.string}});
+ auto emote = Emote({
+ name,
+ ImageSet{
+ Image::fromUrl(getEmoteLinkV3(id, "1x"), 1),
+ Image::fromUrl(getEmoteLinkV3(id, "2x"), 0.5),
+ Image::fromUrl(getEmoteLinkV3(id, "3x"), 0.25),
+ },
+ Tooltip{name.string + "
Channel BetterTTV Emote"},
+ Url{emoteLinkFormat.arg(id.string)},
+ });
emotes[name] = cachedOrMake(std::move(emote), id);
}