recognizes VIP badge
This commit is contained in:
parent
847d790513
commit
1129e0d28a
2 changed files with 14 additions and 3 deletions
|
@ -143,6 +143,8 @@ pub async fn init(mgr: Arc<ModulesManager>) {
|
|||
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<ModulesManager>) {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -127,8 +127,10 @@ pub async fn init(mgr: Arc<ModulesManager>) {
|
|||
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<ModulesManager>) {
|
|||
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(),
|
||||
|
|
Loading…
Reference in a new issue