Add twitch_common crate

This commit is contained in:
Brandon Thomas committed 2022-01-31 03:04:12 -05:00
1 parent e363f90eba
commit db582ca7e7
3 files changed
+70

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
[package]
name = "twitch_common"
edition = "2018"
version = "0.0.1"
authors = [
"Brandon Thomas <bt@brand.io>",
"Brandon Thomas <echelon@gmail.com>",
]
publish = false
[lib]
name = "twitch_common"
path = "src/lib.rs"
[dependencies]
# Internal
container_common = { path = "../container_common" }
# External
anyhow = "1.0.40"
once_cell = "1.9.0"
+47
View File
@@ -0,0 +1,47 @@
use once_cell::sync::Lazy;
use std::collections::HashSet;
/// These cheer emotes always combine with a number
/// This list seems pretty comprehensive
/// https://github.com/nossebro/TwitchPubSubMirror/blob/master/TwitchPubSubMirror_StreamlabsSystem.py
static TWITCH_CHEERS : Lazy<HashSet<String>> = Lazy::new(|| {
let cheers = vec![
"Cheer",
"DoodleCheer",
"BibleThump",
"cheerwhal",
"Corgo",
"uni",
"ShowLove",
"Party",
"SeemsGood",
"Pride",
"Kappa",
"FrankerZ",
"HeyGuys",
"DansGame",
"EleGiggle",
"TriHard",
"Kreygasm",
"4Head",
"SwiftRage",
"NotLikeThis",
"FailFish",
"VoHiYo",
"PJSalt",
"MrDestructoid",
"bday",
"RIPCheer",
"Shamrock",
"BitBoss",
"Streamlabs",
"Muxy",
"HolidayCheer"
];
let mut s = HashSet::new();
for cheer in cheers.into_iter() {
s.insert(cheer.to_string());
}
s
});
+1
View File
@@ -0,0 +1 @@
pub mod cheers;