mirror of
https://github.com/Noratrieb/widetom.git
synced 2026-01-14 08:55:02 +01:00
remove leading 0 in hentai link
This commit is contained in:
parent
9d5e73edee
commit
be64e7b51a
1 changed files with 2 additions and 1 deletions
|
|
@ -58,7 +58,8 @@ pub async fn normal_message(ctx: &Context, msg: &Message) {
|
|||
}
|
||||
|
||||
if let Some(m) = TOM_REGEX.find(&msg.content).unwrap() {
|
||||
reply(&*format!("<https://nhentai.net/g/{}/>", m.as_str()), &msg, &ctx).await;
|
||||
let number = m.as_str().parse::<u32>().expect("matched regex, so it is valid");
|
||||
reply(&*format!("<https://nhentai.net/g/{}/>", number), &msg, &ctx).await;
|
||||
}
|
||||
|
||||
for (trigger, answer) in RESPONSES.iter() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue