feat: better readme ig

This commit is contained in:
Yuzu 2022-07-14 14:24:32 -05:00
parent 4dd48d9bb4
commit 4d4d12342a
4 changed files with 6347 additions and 30 deletions

View File

@ -40,12 +40,10 @@ that you should not make software that does things it is not supposed to do.
### Example bot (TS/JS) ### Example bot (TS/JS)
```js ```js
import { GatewayIntents, Session } from "@oasisjs/biscuit"; import Biscuit, { GatewayIntents } from "@oasisjs/biscuit";
const token = "your token goes here";
const intents = GatewayIntents.MessageContent | GatewayIntents.Guilds | GatewayIntents.GuildMessages; const intents = GatewayIntents.MessageContent | GatewayIntents.Guilds | GatewayIntents.GuildMessages;
const session = new Session({ token, intents }); const session = new Biscuit({ token: "your token", intents });
session.on("ready", ({ user }) => { session.on("ready", ({ user }) => {
console.log("Logged in as:", user.username); console.log("Logged in as:", user.username);

6319
biscuit.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
"entry": "./mod.ts", "entry": "./mod.ts",
"description": "A brand new bleeding edge non bloated Discord library", "description": "A brand new bleeding edge non bloated Discord library",
"homepage": "https://github.com/oasisjs/biscuit", "homepage": "https://github.com/oasisjs/biscuit",
"version": "0.1.0", "version": "0.1.1",
"releaseType": "patch", "releaseType": "patch",
"unstable": false, "unstable": false,
"unlisted": false, "unlisted": false,

View File

@ -3,7 +3,7 @@
* this example should work on most systems, but if it doesn't just clone the library and import everything from mod.ts * this example should work on most systems, but if it doesn't just clone the library and import everything from mod.ts
*/ */
const { GatewayIntents, Session } = require("@oasisjs/biscuit"); const { GatewayIntents, Session } = require("../mod.ts");
// if it didn't worked use: // if it didn't worked use:
// const { GatewayIntents, Session } = require("@oasisjs/biscuit"); // const { GatewayIntents, Session } = require("@oasisjs/biscuit");