Discord webhook integration
Dantevg opened this issue · 0 comments
Dantevg commented
(from draexo at the spigotmc WebStats thread)
Feature
Discord webhook that posts a (non-interactive) embed message with the top 10 (or so) sorted on a specified stat. Auto-update every minute (or so).
Implementation
Probably use inline fields. This has a problem: if there are too many columns or player names are too long, overflowing columns get put on a new row, breaking the visual connection to the player. Alternative is to use code blocks for monospaced manual table display.
Resources
- Intro to webhooks: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
- Discord developer portal: https://discord.com/developers/docs/resources/webhook
- Embed builder GUI: https://autocode.com/tools/discord/embed-builder/
- Embed builder GUI: https://discohook.org
- Some nice Java discord webhook library?
- Custom Gson serialisation: https://github.com/google/gson/blob/master/UserGuide.md#TOC-Custom-Serialization-and-Deserialization