Giant blob of minor changes
[dotfiles/.git] / .local / bin / poster
1 #!/bin/bash
2
3 # update the TOKEN and the CHANNELID, rest is optional
4 # you may need to connect with a websocket the first time you run the bot
5 #   use a library like discord.py to do so
6 value="{\"content\":\"$@\"}";
7 echo $value '{"content":"Posting as a bot"}' ;
8 curl -v \
9 -H "Authorization: Bot TOKEN" \
10 -H "User-Agent: myBotThing (http://some.url, v0.1)" \
11 -H "Content-Type: application/json" \
12 -X POST \
13 -d "$value" \
14 https://discord.com/api/webhooks/761060841020981268/EZbAW-i5W0VSE4OtUkk3wttvdOAKnCZYuibw231IZhtzMgKUGau2_dYKixGzsgP6s0SB