Skip to content

Commit

Permalink
don't waste cycles on incomplete code
Browse files Browse the repository at this point in the history
  • Loading branch information
damaredayo committed Oct 21, 2023
1 parent 9d48817 commit bd41931
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions src/antinuke/antinuke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,40 +137,40 @@ impl Handler {
where
T: AntinukeTriggerTrait,
{
if let Some(modules) = &conf.modules {
if let Some(antinuke) = &modules.antinuke {
if let Some(enabled) = antinuke.enabled {
if !enabled {
return Ok(());
}
}

if antinuke.triggers.is_empty() {
return Ok(());
}

if !antinuke.triggers.iter().any(|t| t.trigger == trigger.typ()) {
return Ok(());
}

let guild_id = trigger.guild_id();
let id = trigger.id();
let typ = trigger.typ();

let user_id = self.get_user_audit(trigger).await?;

if !permissions::check_permission(
conf,
None,
user_id,
permissions::PERMISSION_ANTINUKE_BYPASS,
) {
return Ok(());
}

// TODO: implement antinuke fully
}
};
//if let Some(modules) = &conf.modules {
// if let Some(antinuke) = &modules.antinuke {
// if let Some(enabled) = antinuke.enabled {
// if !enabled {
// return Ok(());
// }
// }
//
// if antinuke.triggers.is_empty() {
// return Ok(());
// }
//
// if !antinuke.triggers.iter().any(|t| t.trigger == trigger.typ()) {
// return Ok(());
// }
//
// let guild_id = trigger.guild_id();
// let id = trigger.id();
// let typ = trigger.typ();
//
// let user_id = self.get_user_audit(trigger).await?;
//
// if !permissions::check_permission(
// conf,
// None,
// user_id,
// permissions::PERMISSION_ANTINUKE_BYPASS,
// ) {
// return Ok(());
// }
//
// // TODO: implement antinuke fully
// }
//};

Ok(())
}
Expand Down

0 comments on commit bd41931

Please sign in to comment.