Open natslol opened 2 years ago
Hey there,
You're using async, so you need to await
the future before it does anything. You can enable the blocking
feature (refer to the docs) to use the non-async versions. Alternatively, to keep using async check out the Rust async docs.
If you have more questions feel free to reach out 😄
Hey,
Thanks for you reply and help but i have an another question i want to use EmbedImageBuilder like this :
.set_image(&EmbedImageBuilder::new().set_url("https://i.imgur.com/UTR1dfw.jpeg").build())
Hm that indeed won't work due to the reference, giving a compiler error.
For now you can bind the EmbedImageBuilder to it's own variable. I'll make sure this gets fixed in 0.1.3
.
Using the following:
fn main() {
let image = EmbedImageBuilder::new()
.set_url("https://i.imgur.com/UTR1dfw.jpeg")
.build();
let req = WebhookRequestBuilder::new()
.set_data(WebhookBuilder::new()
.set_embeds(vec![
EmbedBuilder::new()
.set_image(&image)
.build()
])
.build())
.build();
req.execute_url_sync("[redacted]").unwrap();
}
Results in:
Thanks for your answer and i want to talk privatly can i have your discord ?
Hey there,
Unfortunately my Discord is not available for the public 😅. If you have any questions regarding dwbhk
I'm more than happy to help here though.
Happy coding 😄
Hey,
can we talking on twitter instead ?
And i have an another question why i can't use a content with an embed i want to ping everyone with an embed rip don't mind about Field 😅
And i have an another question why i can't use a content with an embed i want to ping everyone with an embed rip don't mind about Field 😅
This is a Discord limitation
Hey,
can we talking on twitter instead ?
Here is fine 😄
Rip my friend can with cpp why me i cant with rust ?
Rip my friend can with cpp why me i cant with rust ?
The 'limitation' is mentioned in the Discord API docs. Thus I took over that limitation. It might work now, but it might no longer in the future, hence I've stuck to the API docs with dwbhk
😄
As mentioned, please keep it here on GitHub. My Twitter is for my personal stuff, GitHub is for things related to my projects on GitHub.
As mentioned, please keep it here on GitHub. My Twitter is for my personal stuff, GitHub is for things related to my projects on GitHub.
Mmh okok sorry but anyone can see this :(, I Want to do screenshot but the crates don't work with what I want to do and and mostly it's OS issue.
I'm not entirely sure what you mean.
I'm not entirely sure what you mean.
I want to do a Screenshot with Rust
That should be possible, though I don't have a clue on where to start with taking screenshots. I'm not at all versed in the land of GUI.
If you have more questions related to the usage of dwbhk
, please do let me know though :-)
I have a last question,
I want to add an image without url but with a file or a variable that contains the image in Vec<u8>
And how to content + embeds bc i need it :(
Uploading files is currently not supported, as I never got around to implementing it. However you're more than welcome to open a PR for it. You'll want to look at the file[s]
field in the API docs.
I want to execute url but i got this so i think this is why the webhook doesnt send anything
this my code part using your lib