README.adoc (780B)
1 = discordc 2 C Discord ping bot 3 4 Small Discord Gateway bot for one Discord text channel. 5 6 When a non-bot message in that channel is exactly `ping`, `discordc` replies 7 with `pong <latency> ms`. 8 9 == Configuration 10 11 Copy `config.def.h` to `config.h` and set `discord_bot_token` and 12 `discord_channel_id`. 13 14 The bot needs `Send Messages` and `Read Message History` in that channel, plus 15 `Message Content Intent` enabled in Discord Developer Portal -> Bot. 16 17 Invite URL for this bot: 18 19 [source,text] 20 ---- 21 https://discord.com/oauth2/authorize?client_id=1489725985581695057&scope=bot&permissions=3072 22 ---- 23 24 This program uses plain C with `libcurl` and `cJSON`, but no Discord SDK. 25 26 == Installation 27 28 [source,bash] 29 ---- 30 $ make clean install 31 ---- 32 33 == Run 34 35 [source,bash] 36 ---- 37 $ ./bin/discordc 38 ----