Skip to content

Fast and secure functions to build scalable Discord Applications.

License

Notifications You must be signed in to change notification settings

francesnewman/Tempest

 
 

Repository files navigation

Go Reference Go Report License Maintenance Status CodeQL Conventional Commits

Tempest

Tempest is a Discord API wrapper for Applications, written in Golang. It aims to be fast, use minimal caching and be easier to use than other Discord API wrappers using http.

It was created as a better alternative to discord-interactions-go which is "low level" and outdated.

Summary

  1. HTTP vs Gateway
  2. Supported discord features
  3. Special features
  4. Getting Started
  5. Troubleshooting
  6. Contributing

HTTP vs Gateway

TL;DR: you probably should be using libraries like DiscordGo unless you know why you're here.

There are two ways for bots to recieve events from Discord. Most API wrappers such as DiscordGo use a WebSocket connection called a "gateway" to receive events, but Tempest receives interaction events over HTTP. Using http connection lets you easily split your bot into microservices and use far less resources as opposed to gateway but will receive less events. As such, there are some major points to keep in mind before deciding against using gateway.

Supported discord features

Tempest since v1.1.0 supports all discord features (allowed over HTTP) except file transfer. You can accept files but there's currently no support for sending own files. Other elements like command auto complete, components or modals have full support.

Special features

Getting started

  1. Install with: go get -u github.com/Amatsagu/Tempest
  2. Check example with few simple commands.

Troubleshooting

For help feel free to open an issue on github.

Contributing

Contributions are welcomed but for bigger changes I would like first reaching out via Discord (invite amatsagu, id: 390394829789593601) or create an issue to discuss your problems, intentions and ideas. Few rules before making a pull request:

  • Use conventional commits
  • Avoid using interfaces, generics or any/interface{} keywords
    • As we focus on max performance, those elements should be skipped unless required to go forward
  • Add link to document for new structs
    • Since v1.1.0, all structs have links to corresponding discord docs

FOSSA Status

About

Fast and secure functions to build scalable Discord Applications.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%