mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
better readme
This commit is contained in:
parent
ffed682c25
commit
befe240a85
39
README.md
39
README.md
@ -1,17 +1,29 @@
|
|||||||
# biscuit
|
# biscuit
|
||||||
## A brand new bleeding edge non bloated Discord library
|
## A brand new bleeding edge non bloated Discord library
|
||||||
|
|
||||||
The biscuit Discord library is built ontop of Discordeno and webspec APIs, we aim to provide portability and scalabilty.
|
|
||||||
|
|
||||||
Most importantly, biscuit is:
|
### Install
|
||||||
|
```sh
|
||||||
|
npm install @oasisjs/biscuit
|
||||||
|
```
|
||||||
|
> or via [cdn](dummy link)
|
||||||
|
|
||||||
|
The biscuit Discord library is built ontop of Discordeno and webspec APIs, we aim to provide portability.
|
||||||
|
|
||||||
|
### Most importantly, biscuit is:
|
||||||
* A modular [Discordeno](https://github.com/discordeno/discordeno) fork
|
* A modular [Discordeno](https://github.com/discordeno/discordeno) fork
|
||||||
* A portable cross platform Discord library
|
* A framework to build Discord bots
|
||||||
* A framework to build Discord bots in Deno
|
|
||||||
* A bleeding edge API to contact Discord
|
* A bleeding edge API to contact Discord
|
||||||
|
|
||||||
Biscuit is primarly inspired by Discord.js and Discordeno but it does not include a cache layer by default
|
Biscuit is primarly inspired by Discord.js and Discordeno but it does not include a cache layer by default, we believe that you should not make software that does things it is not supposed to do.
|
||||||
|
|
||||||
# Example bot
|
### Why biscuit?:
|
||||||
|
* [Minimal](https://en.wikipedia.org/wiki/Unix_philosophy), non feature-rich!
|
||||||
|
* Crossplatform
|
||||||
|
* Consistent
|
||||||
|
* Performant
|
||||||
|
|
||||||
|
### Example bot (TS/JS)
|
||||||
```js
|
```js
|
||||||
import { GatewayIntents, Session } from "biscuit";
|
import { GatewayIntents, Session } from "biscuit";
|
||||||
|
|
||||||
@ -20,8 +32,8 @@ 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 Session({ token, intents });
|
||||||
|
|
||||||
session.on("ready", (payload) => {
|
session.on("ready", ({ user }) => {
|
||||||
console.log("Logged in as:", payload.user.username)
|
console.log("Logged in as:", user.username);
|
||||||
});
|
});
|
||||||
|
|
||||||
session.on("messageCreate", (message) => {
|
session.on("messageCreate", (message) => {
|
||||||
@ -32,3 +44,14 @@ session.on("messageCreate", (message) => {
|
|||||||
|
|
||||||
session.start();
|
session.start();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Mininal style guide
|
||||||
|
* 4 spaces, no tabs
|
||||||
|
* Semi-colons are mandatory
|
||||||
|
* Run `deno fmt`
|
||||||
|
* Avoid circular dependencies
|
||||||
|
|
||||||
|
### Contrib guide
|
||||||
|
* Install Deno extension [here](https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno)
|
||||||
|
* Run `deno check` to make sure the library works
|
||||||
|
* Avoid sharing state between classes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user