chore: replace Discord link + add semicolons + typo

This commit is contained in:
Yuzu 2022-08-01 20:53:31 -05:00
parent ef5321cb90
commit bc89617de0
6 changed files with 13 additions and 13 deletions

View File

@ -11,7 +11,7 @@ npm install @biscuitland/core
yarn add @biscuitland/core yarn add @biscuitland/core
``` ```
for further reading join our [Discord](https://discord.gg/zmuvzzEFz2) for further reading join our [Discord](https://discord.gg/zqtPgyaFpV)
## Most importantly, biscuit is: ## Most importantly, biscuit is:

View File

View File

View File

@ -12,7 +12,7 @@ npm install @biscuitland/api-types
yarn add @biscuitland/api-types yarn add @biscuitland/api-types
``` ```
for further reading join our [Discord](https://discord.gg/zmuvzzEFz2) for further reading join our [Discord](https://discord.gg/zqtPgyaFpV)
## Most importantly, api-types is: ## Most importantly, api-types is:
1:1 type definitions package for the [Discord](https://discord.com/developers/docs/intro) API: 1:1 type definitions package for the [Discord](https://discord.com/developers/docs/intro) API:

View File

@ -11,7 +11,7 @@ npm install @biscuitland/rest
yarn add @biscuitland/rest yarn add @biscuitland/rest
``` ```
for further reading join our [Discord](https://discord.gg/zmuvzzEFz2) for further reading join our [Discord](https://discord.gg/zqtPgyaFpV)
## Most importantly, biscuit's rest is: ## Most importantly, biscuit's rest is:
A standalone rest library that is yet easy to use and easy to host on a serverless infrastructure, it is meant to be used with biscuit's libraries. A standalone rest library that is yet easy to use and easy to host on a serverless infrastructure, it is meant to be used with biscuit's libraries.

View File

@ -8,20 +8,20 @@
## Install (for [node18](https://nodejs.org/en/download/)) ## Install (for [node18](https://nodejs.org/en/download/))
```sh-session ```sh-session
npm install @biscuitland/rest npm install @biscuitland/ws
yarn add @biscuitland/rest yarn add @biscuitland/ws
``` ```
for further reading join our [Discord](https://discord.gg/zmuvzzEFz2) for further reading join our [Discord](https://discord.gg/zqtPgyaFpV)
## Most importantly, biscuit's ws is: ## Most importantly, biscuit's ws is:
A standalone gateway to interface Discord, it is meant to be used with a rest manager to send fetch requests to Discord A standalone gateway to interface Discord, it is meant to be used with a rest manager to send fetch requests to Discord
## Example (GW proxy) ## Example (GW proxy)
```ts ```ts
import { DefaultWsAdapter } from "@biscuitland/ws" import { DefaultWsAdapter } from "@biscuitland/ws";
import { DefaultRestAdapter } from "@biscuitland/rest" import { DefaultRestAdapter } from "@biscuitland/rest";
import { GATEWAY_BOT, GatewayIntents } from "@biscuitland/api-types" import { GATEWAY_BOT, GatewayIntents } from "@biscuitland/api-types";
const intents = GatewayIntents.Guilds | GatewayIntents.GuildMessages | GatewayIntents.MessageContent; const intents = GatewayIntents.Guilds | GatewayIntents.GuildMessages | GatewayIntents.MessageContent;
@ -59,10 +59,10 @@ const wsManager = new DefaultWsAdapter({
}, },
}); });
wsManager.options.gatewayBot = config wsManager.options.gatewayBot = config;
wsManager.options.lastShardId = wsManager.options.gatewayBot.shards - 1 wsManager.options.lastShardId = wsManager.options.gatewayBot.shards - 1;
wsManager.options.totalShards = wsManager.options.gatewayBot.shards wsManager.options.totalShards = wsManager.options.gatewayBot.shards;
wsManager.agent.options.totalShards = wsManager.options.gatewayBot.shards wsManager.agent.options.totalShards = wsManager.options.gatewayBot.shards;
// start a quick bot // start a quick bot
wsManager.shards(); wsManager.shards();