Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Modules

Gabriel edited this page Feb 7, 2023 · 2 revisions

Deck has 4 modules you can choose to use, and here we'll go through their features and uses.

Common

This module is the most primitive, containing only basic objects, and every other module depends on it.

It might not be appealing for you since it can't do anything on its own, and all other modules already have it bundled.

Rest

The rest module (deck-rest) is a low-level client for Guilded's Rest API. Since it doesn't have a gateway, you can't listen to any events. It still requires a token for all routes and does not have any wrapping for the REST objects.

Gateway

The deck-gateway module is a low-level implementation of Guilded's gateway. If you're only using this module, you can listen to events but can't "react" to them, aside from sending basic commands, such as to appear to be typing in a channel.

Core

The core (deck-core) is high-level conjunction of the rest and gateway modules. It furnishes stateless entities and wrapping of the REST entities and routes and the gateway's events.

The core is the most practical and popular choice, as it implements the rest, gateway, and common modules, creating a powerful and high-level API.

Extras

The extras module (deck-extras) is meant to provide additional handy features to the core module (which don't fit into the library itself) It depends on all the other modules and contains some utilities and tools that people aiming for a more complete bot may find pleasing.

Considerations

You're free to implement as many of these modules as you like, or create alternative implementations of any of them.

Clone this wiki locally