Skip to content

Commit

Permalink
Clarify RESTBot requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
hypergonial committed Jan 11, 2024
1 parent da4956b commit 8f94228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ This model is ideal for bots that need to do things other than just responding t

A **RESTBot** however, isn't constantly connected to Discord, instead, you're expected to host a small HTTP server, and Discord will send [interactions](./guides/interactions.md) to your server
by making HTTP `POST` requests to it. RESTBots **only receive [interactions](./guides/interactions.md)** from Discord, they **do not receive events** or other types of data. They are ideal for bots that manage little to no state,
and rely only on users invoking the bot via slash commands. Setting up a RESTBot however is slightly more complicated compared to a GatewayBot, as it requires a [domain](https://en.wikipedia.org/wiki/Domain_name "A domain name, like 'www.example.com'") with [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security "Transport Layer Security") for Discord to be able to send interactions to your webserver.
and rely only on users invoking the bot via slash commands. Setting up a RESTBot however is slightly more complicated compared to a GatewayBot, as it requires a publically accessible [domain](https://en.wikipedia.org/wiki/Domain_name "A domain name, like 'www.example.com'") with [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security "Transport Layer Security (site with https://)") for Discord to be able to send interactions to your webserver.

!!! question "Does this mean a Gateway bot cannot use the REST API?"
**No.** Both Gateway & REST bots have access to the HTTP REST API Discord provides (see [`Client.rest`][arc.abc.client.Client.rest]), the primary difference between the two bot types is how Discord communicates with **your bot**, and what information it sends to it.
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This model is ideal for bots that need to do things other than just responding t

A **RESTBot** however, isn't constantly connected to Discord, instead, you're expected to host a small HTTP server, and Discord will send [interactions](https://arc.hypergonial.com/guides/interactions/) to your server
by making HTTP `POST` requests to it. RESTBots **only receive [interactions](https://arc.hypergonial.com/guides/interactions/)** from Discord, they **do not receive events** or other types of data. They are ideal for bots that manage little to no state,
and rely only on users invoking the bot via slash commands. Setting up a RESTBot however is slightly more complicated compared to a GatewayBot, as it requires a [domain](https://en.wikipedia.org/wiki/Domain_name) with [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security) for Discord to be able to send interactions to your webserver.
and rely only on users invoking the bot via slash commands. Setting up a RESTBot however is slightly more complicated compared to a GatewayBot, as it requires a publically accessible [domain](https://en.wikipedia.org/wiki/Domain_name) with [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security) for Discord to be able to send interactions to your webserver.

> **Does this mean a Gateway bot cannot use the REST API?**
>
Expand Down

0 comments on commit 8f94228

Please sign in to comment.