Gelbpunkt / gateway-proxy

Drop-in proxy for Discord gateway connections and sessions allowing for zero downtime deploys
GNU Affero General Public License v3.0
88 stars 17 forks source link

Add JDA Example #5

Closed Fabricio20 closed 3 years ago

Fabricio20 commented 3 years ago

Adds a JDA example to the repository, this example was tested on Java 16 but should be compatible starting with Java 8. I added a proper README as well with instructions on how to run it.

The example bot simply logs all messages received and shard status changes, by default TRACE logging is enabled for JDA so raw payloads are shown.

JDA 4 has a limitation that it relies on the private_channels field being present in the READY payload, this example takes care of it by No-Oping the part of the code that uses it. This should be fixed in JDA 5.