SCROLL TO ENTER
Get started The TypeScript framework for Discord
npm i seyfert2.45× LESS MEMORY THAN DISCORD.JSPOWERING BOTS IN PRODUCTION
A command
Declare it, type its options, write run. Seyfert loads it, registers it with Discord and hands you a typed context.
src/commands/echo.ts18 lines
import {
Declare, Options, Command, createStringOption, type CommandContext,
} from 'seyfert';
const options = {
message: createStringOption({
description: 'What should I echo back?',
required: true,
}),
};
@Declare({ name: 'echo', description: 'Repeat after me' })
@Options(options)
export default class EchoCommand extends Command {
async run(ctx: CommandContext<typeof options>) {
await ctx.write({ content: ctx.options.message });
}
}
Echo APP replying to /echohello from the core
Leave the
ceremony behind
LINES IN DISCORD.JSLINES IN SEYFERT
discord.js v14 · index.js
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.commands = new Collection();
const folders = readdirSync(join(__dirname, 'commands'));
for (const folder of folders) {
const files = readdirSync(join(__dirname, 'commands', folder));
for (const file of files.filter((f) => f.endsWith('.js'))) {
const command = require(join(__dirname, 'commands', folder, file));
client.commands.set(command.data.name, command);
}
}
client.on(Events.InteractionCreate, async (interaction) => {
if (!interaction.isChatInputCommand()) return;
const command = client.commands.get(interaction.commandName);
if (!command) return;
await command.execute(interaction);
});
client.login(token);
// …then: node deploy-commands.js
seyfert · the whole boot
// seyfert.config.mjs
export default config.bot({
token: process.env.BOT_TOKEN ?? '',
locations: { base: 'dist', commands: 'commands' },
intents: ['Guilds'],
});
// src/index.ts
const client = new Client();
client.start().then(() => client.uploadCommands());
DISCORD.JS · MEDIAN MEMORYSEYFERT · MEDIAN MEMORY
216MB
2.45× lighter under the same gateway load.
FULL MEASUREMENTS ↗IN ORBIT · BOTS RUNNING ON SEYFERT
Listen“under 1 GB, from almost 4 GB”
CactusFire“nothing better than Seyfert”
Button Bot“handled everything seamlessly”
Kenium“the most resource-efficient”
Stelle“open-source, on Seyfert”
Multiversal“recognised by numerous servers”
Lumi“light memory footprint”
Hiraku Shinzou“all my homies use Seyfert”
START BUILDING
npm i seyfert