This blog post shows how to create a token:
Enable developer mode:
- User Settings
- Advanced
- Enable Developer Mode
Get the channel id:
- Right click on a channel
- Select "copy id"
Make a request:
curl -H "Authorization: Bot $DISCORD_TOKEN" \
-H "Content-Type: application/json" \
-XPOST "https://discordapp.com/api/channels/$CHANNEL_ID/messages" -d '{"content": "hi"}'