Skip to content

Commit

Permalink
Merge pull request #96 from uku3lig/do-not-reply-to-yourself-pretty-p…
Browse files Browse the repository at this point in the history
…lease
  • Loading branch information
sakecode authored Dec 1, 2023
2 parents f997cbd + e334f8a commit cf9e627
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/handlers/event/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ pub async fn handle(
}

fn should_echo(
framework: FrameworkContext<'_, Data, Report>,
_framework: FrameworkContext<'_, Data, Report>,
msg: &Message,
settings: &Settings,
) -> bool {
let gid = msg.guild_id.unwrap_or_default();
if msg.author.id == framework.bot_id {
if msg.author.bot && msg.webhook_id.is_none() {
info!("I don't like repeating myself...");
return false;
}

if !settings.is_guild_allowed(gid) {
Expand Down

0 comments on commit cf9e627

Please sign in to comment.