Skip to content

Instantly share code, notes, and snippets.

@celik23
celik23 / discord-bot-post-message.sh
Created March 17, 2024 09:14 — forked from ianklatzco/discord-bot-post-message.sh
sends a message to a discord channel via a bot using command line HTTP POST- curl
#!/bin/bash
# update the TOKEN and the CHANNELID, rest is optional
# you may need to connect with a websocket the first time you run the bot
# use a library like discord.py to do so
curl -v \
-H "Authorization: Bot TOKEN" \
-H "User-Agent: myBotThing (http://some.url, v0.1)" \
-H "Content-Type: application/json" \