1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-27 17:23:00 +00:00
arikawa/0-examples/commands-hybrid
2023-11-04 01:48:17 -07:00
..
main.go cmdroute: Fix OverwriteCommands being broken 2023-11-04 01:48:17 -07:00
README.md examples: Add commands-hybrid 2022-08-22 23:45:07 -07:00

commands-hybrid

commands-hybrid is an alternative variant of commands, where the program permits being hosted either as a Gateway-based daemon or as a web server using the Interactions Webhook API.

Usage

Gateway Mode

BOT_TOKEN="<token here>" go run .

Interactions Webhook Mode

BOT_TOKEN="<token here>" WEBHOOK_ADDR="localhost:29485" WEBHOOK_PUBKEY="<hex app pubkey>" go run .

The endpoint will be http://localhost:29485/. I recommend using something like srv.us to expose this endpoint as a public one, which can then be used by Discord.