We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
reqwest::Url
1 parent 93b20db commit 80eaea7Copy full SHA for 80eaea7
src/commands/shiggy.rs
@@ -11,7 +11,10 @@ struct SafebooruResponse {
11
#[poise::command(slash_command)]
12
pub async fn shiggy(ctx: Context<'_>) -> Result<()> {
13
ctx.defer().await?;
14
- let url = "https://safebooru.donmai.us/posts/random.json?tags=kemomimi-chan_(naga_u)+naga_u&only=file_url";
+ let mut url = "https://safebooru.donmai.us/posts/random.json".parse::<reqwest::Url>()?;
15
+ url.query_pairs_mut()
16
+ .append_pair("tags", "kemomimi-chan_(naga_u) naga_u")
17
+ .append_pair("only", "file_url");
18
19
let resp = crate::reqwest_client::HTTP.get(url).send().await?;
20
0 commit comments