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 🙏

© 2026 – Pkg Stats / Ryan Hefner

anqder

v1.0.5

Published

New framework for easy create bot with discord.js library

Downloads

15

Readme

anqder

npm version npm downloads (monthly) license

A small, lightweight core framework that makes building Discord bots with discord.js easier.

anqder is a minimalist core that accepts your existing Discord Client and makes common tasks — event registration, interaction handling (buttons/modals), i18n plumbing, and logging — simple and repeatable. Point Anqder at your folders and it will auto-load and wire up the pieces.


✨ Features

  • Plug your existing discord.js Client — no forced client lifecycle.
  • Auto-load events, buttons, modals and commands from provided folders.
  • Optional i18n integration support (i18next with ICU pattern).
  • Flexible logger adapter support (use your own logger).
  • TypeScript-ready with shipped .d.ts types.
  • Outputs both ESM and CJS builds.

🚀 Install

npm install anqder
# or
yarn add anqder

🔧 Quick Start

import path from 'node:path'
import { Anqder } from 'anqder'
import { Logger } from 'winston' // optional, for example, you can use any logger instance
import { i18n } from './i18n' // optional

const anqder = new Anqder({
  client: this.client,
  i18n: i18n,
  eventsPath: path.resolve(process.cwd(), './src/discord/events'),
  modalsPath: path.resolve(process.cwd(), './src/discord/modals'),
  buttonsPath: path.resolve(process.cwd(), './src/discord/buttons'),
  commandsPath: path.resolve(process.cwd(), './src/discord/commands'),
  mode: process.env.NODE_ENV,
  logger: {
    level: process.env.NODE_ENV === 'production' ? 'info' : 'debug',
    adapter: Logger.child({ label: 'Anqder' })
  }
})

await anqder.init()

After init() Anqder will:

  • discover and register event handlers from eventsPath,
  • register interaction handlers from buttonsPath and modalsPath,
  • optionally register commands from commandsPath

📁 Recommended project structure

src/
  discord/
    events/
      ready.ts
      interactionCreate.ts
    buttons/
      pingButton.ts
    modals/
      feedbackModal.ts
    commands/
      ping.ts
package.json
index.ts

Put one handler per file. Anqder will scan the configured folders and wire them to the client.


⚙️ Configuration (Types)

export interface AnqderOptions {
  client: Client
  i18n?: (language?: string) => TFunction
  eventsPath?: string
  modalsPath?: string
  buttonsPath?: string
  commandsPath?: string
  mode?: 'development' | 'production' | 'dev' | 'prod' | 'develop' | string
  logger?: { level?: LogLevel; adapter?: LoggerAdapter }
}

type LogLevel = 'error' | 'warn' | 'info' | 'debug'

interface LoggerAdapter {
  error(...args: unknown[]): void
  warn(...args: unknown[]): void
  info(...args: unknown[]): void
  debug(...args: unknown[]): void
}
  • client — your discord.js Client instance.
  • i18n — optional factory returning a TFunction translator for a given language.
  • eventsPath, modalsPath, buttonsPath, commandsPath — folders to auto-load modules from.
  • mode — environment mode; used for sensible defaults.
  • logger — optional logger config: a log level and an adapter compatible with LoggerAdapter.

🧩 i18n

If you provide i18n as a factory (language?: string) => TFunction, handlers can call the returned function to translate messages per user or guild locale.

Example:

const t = anqder.i18n?.('en')
t?.('welcome.message')

🔌 Logger adapter

Anqder expects an adapter object exposing error, warn, info, debug. This keeps the internals logger-agnostic:

const loggerAdapter: LoggerAdapter = {
  error: (...args) => pino.error(...args),
  warn: (...args) => pino.warn(...args),
  info: (...args) => pino.info(...args),
  debug: (...args) => pino.debug(...args)
}

🧾 License

This project is licensed under GPL-3.0-only. See the full license in LICENSE.

Note: GPL-3.0-only is a strong copyleft license. When you distribute software that links with or includes GPL-3.0-only code, your distribution must comply with GPL-3.0-only terms. Make sure GPL fits your intended distribution model.


📬 Questions?

Open an issue on GitHub: https://github.com/iamAlond/anqder