Skip to content
This repository was archived by the owner on Dec 14, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions psp-papers-mod/src/EmotePapers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.IO;
using System.Numerics;
using haxe.io;
using psp_papers_mod.Twitch;
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.Formats.Webp;
Expand All @@ -21,11 +22,9 @@ internal class EmotePapers {

public static string desiredEmote = "buh";

// todo: set these ids according to channel
private static string id = "104391402";
private static string emoteSetUrl_7TV = "https://7tv.io/v3/users/twitch/" + id;
private static string emoteSetUrl_BTTV = "https://api.betterttv.net/3/cached/users/twitch/" + id;
private static string emoteSetUrl_FFZ = "https://api.frankerfacez.com/v1/room/psp1g";
private static string emoteSetUrl_7TV = "https://7tv.io/v3/users/twitch/" + PapersPSP.Twitch.BroadcasterID;
private static string emoteSetUrl_BTTV = "https://api.betterttv.net/3/cached/users/twitch/" + PapersPSP.Twitch.BroadcasterID;
private static string emoteSetUrl_FFZ = "https://api.frankerfacez.com/v1/room/" + Cfg.Channel.Value;

private static string emoteUrl_7TV = "https://cdn.7tv.app/emote/{0}/4x.webp";
private static string emoteUrl_Twitch = "https://static-cdn.jtvnw.net/emoticons/v2/{0}/default/dark/3.0";
Expand All @@ -38,7 +37,7 @@ internal class EmotePapers {
private static string emoteErrorUrl = "https://cdn.7tv.app/emote/6151c1de43b2d9da0d32adf9/4x.webp";

public static void Initialize() {
Console.WriteLine(emoteSetUrl_FFZ + " " + emoteSetUrl_BTTV);
Console.WriteLine(emoteSetUrl_FFZ + "\n " + emoteSetUrl_BTTV + " \n" + emoteSetUrl_7TV);

GetEmoteSet_7TV().ResultWithUnityThread((res) => {
emotes_7TV = res;
Expand Down Expand Up @@ -127,7 +126,7 @@ public static string GetEmoteUrl_FFZ(string emoteName) {
}
}

PapersPSP.Log.LogWarning("FFZ Emote not found!");
PapersPSP.Log.LogMessage("FFZ Emote not found!");
return null;
}

Expand All @@ -148,6 +147,7 @@ public static string GetEmoteUrl_BTTV(string emoteName) {
public static void GiveEmotePaper(string text, ChatMessage chatMessage) {
string emoteUrl = null;
bool isWebp = true;

if (emoteUrl == null) emoteUrl = GetEmoteUrl_7TV(text);
if (emoteUrl == null) emoteUrl = GetEmoteUrl_BTTV(text);
if (emoteUrl == null) {
Expand Down