C
C#15mo ago
Elmishh

❔ sending files through a discord webhook

is that possible? in a console app btw
9 Replies
cap5lut
cap5lut15mo ago
a web hook is just a specific endpoint on a webserver, so its doable, the HttpClient provides all required functionality for that. https://brokul.dev/sending-files-and-additional-data-using-httpclient-in-net-core
brokul.dev
Sending files and additional data using HttpClient in .NET Core
This article presents how to configure the multipart form-data request to send files and additional data in the ASP.NET Core application.
Elmishh
ElmishhOP15mo ago
Also can i change the channel of a discord webhook with code?
cap5lut
cap5lut15mo ago
that i dunno, been a couple years since i wrote my last discord bot. but simpliest should still be to just have 2 separate web hooks for the 2 different channels
Anu6is
Anu6is15mo ago
Yes you can
Elmishh
ElmishhOP15mo ago
Any documents on how?
Anu6is
Anu6is15mo ago
Can't say how off the top of my head but it's possible
Jimmacle
Jimmacle15mo ago
the discord api documentation, probably
Elmishh
ElmishhOP15mo ago
Since i wanna be able to move the webhook between channels using their id Easier than having 15, of the same webhook Anyways gtg bye
Accord
Accord15mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server