Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stifskere committed Aug 2, 2024
1 parent cdca1ba commit ae67170
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ once_cell = "1.18.0"
gen_welcome = { version = "0.1.0", path = "crates/gen_welcome" }
urlencoding = "2.1.3"
lazy_static = "1.4.0"
time = "0.3.36"

[dependencies.parking_lot]
version = "0.12"
Expand Down
4 changes: 4 additions & 0 deletions src/events/read_github_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ async fn read_message(link: String) -> Option<String> {
#[async_trait]
impl EventHandler for ReadGithubLinkHandler {
async fn message(&self, ctx: Context, msg: Message) {
if msg.author.bot {
return;
}

let repo_regex
= Regex::new(r"(https://github\.com/(?:[^/]+/){2})blob/(.*)")
.unwrap();
Expand Down

0 comments on commit ae67170

Please sign in to comment.