diff --git a/src/core/botmodules.rs b/src/core/botmodules.rs index 25206df..188b560 100644 --- a/src/core/botmodules.rs +++ b/src/core/botmodules.rs @@ -143,6 +143,8 @@ pub async fn init(mgr: Arc) { requestor_badge_mut = Some(ChatBadge::Mod); } else if b.name == "broadcaster" { requestor_badge_mut = Some(ChatBadge::Broadcaster); + } else if b.name == "vip" { + requestor_badge_mut = Some(ChatBadge::VIP); } } @@ -330,6 +332,8 @@ pub async fn init(mgr: Arc) { requestor_badge_mut = Some(ChatBadge::Mod); } else if b.name == "broadcaster" { requestor_badge_mut = Some(ChatBadge::Broadcaster); + } else if b.name == "vip" { + requestor_badge_mut = Some(ChatBadge::VIP); } } diff --git a/src/core/identity.rs b/src/core/identity.rs index 2fbf56e..03d4a6a 100644 --- a/src/core/identity.rs +++ b/src/core/identity.rs @@ -127,8 +127,10 @@ pub async fn init(mgr: Arc) { sender_badge = Some(ChatBadge::Mod); } else if b.name == "broadcaster" { sender_badge = Some(ChatBadge::Broadcaster); + } else if b.name == "vip" { + sender_badge = Some(ChatBadge::VIP); } - } + }; let targetchnl = params.msg.channel_login.to_lowercase(); @@ -327,8 +329,10 @@ pub async fn init(mgr: Arc) { sender_badge_mut = Some(ChatBadge::Mod); } else if b.name == "broadcaster" { sender_badge_mut = Some(ChatBadge::Broadcaster); + } else if b.name == "vip" { + sender_badge_mut = Some(ChatBadge::VIP); } - } + }; let sender_badge = sender_badge_mut; @@ -608,6 +612,7 @@ pub struct IdentityManager { pub enum ChatBadge { Broadcaster, Mod, + VIP, } impl IdentityManager { @@ -687,8 +692,10 @@ impl IdentityManager { sender_badge = Some(ChatBadge::Mod); } else if b.name == "broadcaster" { sender_badge = Some(ChatBadge::Broadcaster); + } else if b.name == "vip" { + sender_badge = Some(ChatBadge::VIP); } - } + }; self.can_user_run( msg.sender.name.to_owned(),