aboutsummaryrefslogtreecommitdiffstats
path: root/src/commands/web.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/commands/web.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commands/web.rs b/src/commands/web.rs
index d68f663..f8b8667 100644
--- a/src/commands/web.rs
+++ b/src/commands/web.rs
@@ -1,3 +1,5 @@
1use std::time::Duration;
2
1use poise::serenity_prelude as serenity; 3use poise::serenity_prelude as serenity;
2use scraper::{Html, Selector}; 4use scraper::{Html, Selector};
3 5
@@ -20,6 +22,7 @@ pub async fn web(ctx: Context<'_>, #[description = "Search query"] query: String
20 .data() 22 .data()
21 .http_client 23 .http_client
22 .get(&url) 24 .get(&url)
25 .timeout(Duration::from_secs(15))
23 .send() 26 .send()
24 .await? 27 .await?
25 .text() 28 .text()