Added power level control to warn command
parent
d958a2135d
commit
341821e63d
|
@ -338,9 +338,12 @@ pub mod bot {
|
|||
dbg!(self.database_handle.get(words[2]).unwrap());
|
||||
let (timestamp, mut reputation) =
|
||||
convert_from_bytes_sled(&user_data.unwrap());
|
||||
if words[1] == "warn" {
|
||||
if words[1] == "warn" && member.power_level() >= 50 {
|
||||
reputation -= 1
|
||||
}
|
||||
if words[1] == "warn" && member.power_level() < 50 {
|
||||
self.send_message("This command is for moderators and admins only!").await;
|
||||
}
|
||||
if words[1] == "award" {
|
||||
reputation += 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue