Webhooks

I want to ask what are webhooks...? what is their purpose with djs and outside...? what can webhooks do and their limitations...? can discord webhooks only send messages...? Is there a way i can use webhooks to connect to some other website/app...like making my own app and getting discord messages on my app than on this interface or it is seemingly not possible at all... how is it done then? Tell me like i know nothing about them...
29 Replies
d.js toolkit
d.js toolkit16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
d.js docs
d.js docs16mo ago
guide Popular Topics: Webhooks read more
dragonn
dragonnOP16mo ago
Further note: i have already read the djs site...developer portal... multiple blogs... asked chatgpt about it... asked some people about it... Frankly speaking i never worked with webhooks... they were at last of the topic so before trying them out...i wanna know their philosophy
Parogo_72
Parogo_7216mo ago
the guide tells you what a webhook is
Parogo_72
Parogo_7216mo ago
Parogo_72
Parogo_7216mo ago
webhooks only send messages, they dont receive any data from discord as they arent a client that connects to the gateway
dragonn
dragonnOP16mo ago
If they dont recieve data then why post and get webhooks... what is the use of get webhooks with respect to djs... i have seen bot sending other channel news and i know they re webhooks...but arent they just post webhooks... why use get... also kindly refer to all of my questions... i am kinda confused as why one need to use them when they are alr using djs for bot making
Parogo_72
Parogo_7216mo ago
because you dont connect to the gateway when using a webhook literally read the image I sent
dragonn
dragonnOP16mo ago
I have read 3 times the djs guide man... i am unable to grasp the concept
Parogo_72
Parogo_7216mo ago
I dont know what type of answer you expect. With webhooks you dont need to log in with your bot at all to send messages
dragonn
dragonnOP16mo ago
Kindly answer my questions as i have written in order... they may help me out... i dont see the appeal of why does one uses webhook in replacement of bot except they re not using the bot... also im confused as wdym by log in with bot... Sending message without the bot and sending them without being logged into bots are 2 things...right In 1st i am assuming discord has a system which sends the message as soon as it receives their id and message content-> in case it is a post webhook...just like how URLs turn into embeds... In 2nd i am assuming bot is someone else's and once they receieve a webhook...the bot sends it...so u dont have to be logged in them to work... Kindly tell me if i am correct on anything
treble/luna
treble/luna16mo ago
webhooks just send messages. they dont need t o login, no ws connection, no nothing. they can be used in for example websites. webhooks are also somewhat separate from bots, they can be created by anyone. Look at bots such as pluralkit, they use webhooks all it takes is a simple post request
dragonn
dragonnOP16mo ago
Thank you now it is being understandable... why do we have 3 GET webhooks and what is their purpose since post will upload something on a channel
treble/luna
treble/luna16mo ago
you can also get messages sent by the webhook
dragonn
dragonnOP16mo ago
To do what?
treble/luna
treble/luna16mo ago
whatever you want to do with it
dragonn
dragonnOP16mo ago
Kindly tell me an example... is it like to take a message from one channel using get webhook and then post in other channel using post webhook?
treble/luna
treble/luna16mo ago
webhooks can only fetch their own messages
dragonn
dragonnOP16mo ago
So a message they have posted... they can fetch them again for a reuse?
dragonn
dragonnOP16mo ago
Thank you i will look into it too...but lets continue with the explanation If i can do that.... it also means i can reuse multiple webhooks to send in as many channels i like?
treble/luna
treble/luna16mo ago
a webhook is per channel
dragonn
dragonnOP16mo ago
Can I use discord webhooks out of discord...like either sending to my own webapp or saving it in file
Parogo_72
Parogo_7216mo ago
no, webhooks only send messages to a discord channel
dragonn
dragonnOP16mo ago
Ok last question If i want to use the feature to post the embed to channels and on my webapp both... should i use bot to do that or is there any other way to achieve that... I had seen a server where they used to send embeds on channels and on their website...idk if they did it automatically or manually
Parogo_72
Parogo_7216mo ago
they probably use a webhook
dragonn
dragonnOP16mo ago
So i can use webhooks out of discord to post messages to my website as well...
Parogo_72
Parogo_7216mo ago
to post messages from not to you dont send any messages to your website, you send a message with a webhook from your website code to the discord channel
dragonn
dragonnOP16mo ago
Oh i see... now i understand.. so summary of this conversation is that webhooks can only send messages to discord channels out of anywhere...without using the bot...by anyone.. But in order to fetch commands or embeds from channels to post outside...i must use bot and hence the api! Thank you very much gentleman and gentle lady for the help
Want results from more Discord servers?
Add your server