Giter VIP home page Giter VIP logo

biscuit's Introduction

biscuit

A brand new bleeding edge non bloated Discord library

biscuit

ETA: biscuit will be on the npm registry the next week!

Install (for node18)

npm install @oasisjs/biscuit
pnpm add @oasisjs/biscuit
yarn add @oasisjs/biscuit

or via cdn

The biscuit Discord library is built ontop of Discordeno and webspec APIs, we aim to provide portability. Join our Discord

Most importantly, biscuit is:

  • A modular Discordeno fork
  • A framework to build Discord bots
  • 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, we believe that you should not make software that does things it is not supposed to do.

Why biscuit?:

  • Minimal, non feature-rich!
  • Crossplatform
  • Consistent
  • Performant

Example bot (TS/JS)

import { GatewayIntents, Session } from "@oasisjs/biscuit";

const token = "your token goes here";

const intents = GatewayIntents.MessageContent | GatewayIntents.Guilds | GatewayIntents.GuildMessages;
const session = new Session({ token, intents });

session.on("ready", ({ user }) => {
    console.log("Logged in as:", user.username);
});

session.on("messageCreate", (message) => {
    if (message.content.startsWith("!ping")) {
        message.reply({ content: "pong!" });
    }
});

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
  • Run deno check to make sure the library works
  • Avoid sharing state between classes

Compatibility (bun)

โš ๏ธ DISCLAIMER: since bun is unestable I highly recommend running biscuit on node!

  • We got the library running on EndeavourOS but it spams the ready event multiple times
  • We got the library running on Arch/Artix Linux but breaks when sending fetch requests
  • We got the library running on WSL (Ubuntu) without any trouble

Known issues:

  • some properties may be not implemented yet
  • some structures are not implemented (see https://github.com/oasisjs/biscuit/issues)
  • cache (wip)
  • no optimal way to create embeds, should be fixed in builders tho

biscuit's People

Contributors

yuzudev avatar nicolito128 avatar socram03 avatar paperdave avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.