Discord bots are hosted elsewhere right? Since Discourse has an open rest API everything Discord does is possible out of box
with Discourse you get an extra boost, as you can make it a Discourse plugin that runs in the same server
or even a Customization > Theme component that is lightweight and safe