npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@stelliajs/framework

v1.5.9

Published

A framework for simplify the creation of discord bots

Downloads

154

Readme

StelliaJS

About

StelliaJS is built using Discord JS V14 and TypeScript. It allows you to quickly set up a new bot with a simple and complete architecture. A CLI is available to help you set up a project with StelliaJS : link to the CLI

Architecture

Recommended architecture for StelliaJS project.

.
├── src/
│   ├── commands/
│   │   ├── contextMenus/
│   │   │   └── mute.ts
│   │   └── slash/
│   │       ├── moderation // You can create folders, everything is loaded recursively
│   │       │   ├── ban.ts
│   │       │   └── mute.ts
│   │       └── ping.ts
│   ├── environments/
│   │   ├── environment.development.ts
│   │   ├── environment.model.ts
│   │   └── environment.ts
│   ├── events/
│   │   ├── ready.ts
│   │   └── interactionCreate.ts
│   ├── interactions/
│   │   ├── autoCompletes/
│   │   │   └── song.ts
│   │   ├── buttons/
│   │   │   └── colorChoice.ts
│   │   ├── modals/
│   │   │   └── form.ts
│   │   └── selectMenus/
│   │       └── settings.ts
│   ├── environment.d.ts
│   └── index.ts
├── .env
├── package.json
├── pnpm-lock.yaml
├── stellia.json
└── tsconfig.json

Examples

Simple client with environment

Client initialization

import { StelliaClient } from "@stelliajs/framework";
import { GatewayIntentBits, Partials } from "discord.js";

(async () => {
    const client = new StelliaClient({
        intents: [
            GatewayIntentBits.Guilds,
            GatewayIntentBits.GuildMessages,
            GatewayIntentBits.MessageContent,
            GatewayIntentBits.GuildMembers
        ],
        partials: [Partials.Message, Partials.GuildMember]
    },
    {
        managers: {
            autoCompletes: {
                directoryPath: "./interactions/autoCompletes"
            },
            buttons: {
                directoryPath: "./interactions/buttons"
            },
            commands: {
                directoryPath: "./commands/slash"
            },
            contextMenus: {
                directoryPath: "./commands/contextMenus"
            },
            events: {
                directoryPath: "./events"
            },
            modals: {
                directoryPath: "./interactions/modals"
            },
            selectMenus: {
                directoryPath: "./interactions/selectMenus"
            }
        },
        environment: {
            areGuildsConfigurationEnabled: true
        }
    });

    await client.connect(process.env.TOKEN);
})();

Environment model

import {
    BaseGeneralConfiguration,
    BaseGuildConfiguration,
    GuildConfiguration,
    GuildsConfiguration
} from "@stelliajs/framework";
import { Snowflake } from "discord.js";

interface MyBotGeneralConfiguration extends BaseGeneralConfiguration {
    botName: string;
}
interface MyBotSpecificGuildConfiguration extends BaseGuildConfiguration {
    channels: {
        logs: Snowflake;
        welcome: Snowflake;
    };
}

export interface MyBotGuildConfiguration extends GuildConfiguration {
    general: MyBotGeneralConfiguration;
    guild: MyBotSpecificGuildConfiguration;
}

export interface MyBotGuildsConfiguration extends GuildsConfiguration {
    general: MyBotGeneralConfiguration;
    guilds: {
        [guildId: Snowflake]: MyBotSpecificGuildConfiguration;
    };
}

Interactions/Events with environment

Ready event

import { type EventStructure, type StelliaClient } from "@stelliajs/framework";
import { Events } from "discord.js";
import { type MyBotGuildsConfiguration } from "@environments/environment.model.ts";

export default {
    data: {
        name: Events.ClientReady,
        once: true
    },
    async execute(client: StelliaClient<true>, guildsConfiguration: MyBotGuildsConfiguration) { // <true> ensures that the client is Ready
        console.log(`Logged in as ${client.user.tag}`);
        await client.initializeCommands(); // Used to initialise registered commands
    }
} satisfies EventStructure;

InteractionCreate event

import { type StelliaClient, type EventStructure } from "@stelliajs/framework";
import { Events, type Interaction } from "discord.js";
import { type MyBotGuildConfiguration } from "@environments/environment.model.ts";

export default {
    data: {
        name: Events.InteractionCreate,
        once: false
    },
    async execute(client: StelliaClient<true>, guildConfiguration: MyBotGuildConfiguration, interaction: Interaction) {
        if (interaction.inCachedGuild()) {
            await client.handleInteraction(interaction); // Automatic interaction handling
        }
    }
} satisfies EventStructure;

Command interaction

import { type CommandStructure, type StelliaClient } from "@stelliajs/framework";
import { type ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
import { type MyBotGuildConfiguration } from "@environments/environment.model.ts";

export default {
    data: {
        command: new SlashCommandBuilder()
            .setName("ping"),
        reply: {
            autoDefer: true, // Defer the reply to avoid the interaction failing after 3 seconds
            ephemeral: true, // The reply will be visible only by the user who triggered the interaction
        }
    },
    async execute(client: StelliaClient, guildConfiguration: MyBotGuildConfiguration, interaction: ChatInputCommandInteraction<"cached">) { // All interactions are cached
        await interaction.editReply("Pong!");
    }
} satisfies CommandStructure;

Help

If you need help with the framework you can open an issue.