I am a newbie to Discord. Recently, my friend and I started a discord channel for a live talk session to interview people and share our experiences with interested people.
When sending a message, I'm thinking about a way to send a message through a bot instead of using my account, so my friend taught me a way to do that. And today, you will know it too!!
First of all, you have to be an admin of that server. Then, visit the server setting > integration > webhook.
Then, click "New Webhook" and choose the channel that you want to send message to
Later on, click on the button "Copy Webhook URL" to copy the webhook URL
Lastly, you can send a message by inputting it into the curl.
curl --location --request POST '{YOUR_WEBHOOK_URL}' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": "{YOUR_MESSAGE}",
"username": "{SENDER_NAME}",
"avatar_url": "{PICTURE_URL}"
}
'
Please feel free to share interesting bot and command in discord with me ๐พ
Top comments (1)
Hello nice post about Discord and Curl!
Don't hesitate to put colors on your
codeblock
like this example for have to have a better understanding of your code ๐