Install (for node18)
npm install @biscuitland/core
yarn add @biscuitland/core
for further reading join our Discord
- A wrapper to interface the Discord API
- A bleeding edge library
Biscuit is primarily 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.
- Minimal, non feature-rich!
- Scalable
import { Session } from '@biscuitland/core';
import { GatewayIntents } from '@biscuitland/api-types';
const session = new Session({ token: 'your token', intents: GatewayIntents.Guilds });
const commands = [
{
name: 'ping',
description: 'Replies with pong!'
}
];
session.events.on('ready', ({ user }) => {
console.log('Logged in as:', user.tag);
session.upsertApplicationCommands(commands, 'GUILD_ID');
});
session.events.on('interactionCreate', (interaction) => {
if (interaction.isCommand()) {
// your commands go here
if (interaction.commandName === 'ping') {
interaction.respondWith({ content: 'pong!' });
}
}
});
session.start();
- node18 is required to run the library, however --experimental-fetch flag should work on node16+
- redis cache (wip)
- no optimal way to deliver a webspec bun version to the registry (#50)