C
C#11mo ago
Elmishh

❔ sending files through a discord webhook

is that possible? in a console app btw
9 Replies
cap5lut
cap5lut11mo 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
Elmishh11mo ago
Also can i change the channel of a discord webhook with code?
cap5lut
cap5lut11mo 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
Anu6is11mo ago
Yes you can
Elmishh
Elmishh11mo ago
Any documents on how?
Anu6is
Anu6is11mo ago
Can't say how off the top of my head but it's possible
Jimmacle
Jimmacle11mo ago
the discord api documentation, probably
Elmishh
Elmishh11mo 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
Accord11mo 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
More Posts
Custom class is not able to be used with generic type THello everyone I am just programming and run into a problem. I wrote a custom class: ```namespace DM❔ SOLVER Ordering messages based on the receiver or sender last messageI have this piece of code ``` public async Task<List<UserLimitedDto>> GetUsersThatHaveMessag✅ (Solved) (Dapper) how to make a single query with one-to-many objects?``` connection.QueryAsync<Request, Patient, Registrant, Request>``` i don't think `QuerySingleAsync`✅ WPF app keeps launching Console WindowHey all, new here, I believe this is the correct forum to ask this. Anyways, I am building a wpf app❔ Suggest a good ASP.NET Core MVC Tutorial that can help me get Started.Hello, I finished with the fundamental C# with FreeCodeCamp and Microsoft on September 9, 2023. I wo❔ Cant merge the same audio file twice or more using WaveFileWriter.CreateWaveFile16();Hello, Im trying to merge the audio files using **NAudio**, but if they repeat it doesnt cout it. ✅ What is the best way to store basic C#?Hi, I'm testing my C# code and learning from it. For example deserializing and serializing JSON usin❔ Question about Layered StructureGuys do you think it is bad to expose Entities Layer both DAL and Services layer? And where should I❔ ✅ Swagger not sending Guid string correctlyHello all, I have a controller set up exactly the same as some other controllers to get an item by a✅ Web things minimal apiafter tons of codding i totally forgot what i wanted to do lmao, so problem is - product has click e