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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dbm-types

v0.3.0

Published

Type definitions for Discord Bot Maker by the DBM German community.

Downloads

110

Readme

DBM Types

Type definitions for Discord Bot Maker by the DBM German community.

Supported versions

| DBM version | Types | JSDoc | |-------------|-------------|------------| | 2.1 | ✅ Done | ✅ Done | | 1.6 | ❌ Missing | ❌ Missing | | 1.5 | ❌ Missing | ❌ Missing | | 1.4 | ❌ Missing | ❌ Missing |

How to use

In order to access the type definitions, one of the supported versions has to be appended to the import path. Here are some examples:

// CommonJS
const { DBMVarType } = require("dbm-types/dbm-2.1");
// ES Module
import { DBMVarType } from "dbm-types/dbm-2.1";

let storage: DBMVarType;
let varName: string;

In addition to the core DBM types it also bundles the correct version of the following pre-installed node modules:

Each can be accessed via its designated namespace.

// CommonJS
const { Discord, DiscordAPI } = require("dbm-types/dbm-2.1");
// ES Module
import { Discord, DiscordAPI } from "dbm-types/dbm-2.1";

let id: Discord.Snowflake;
let rawGuild: DiscordAPI.APIGuild;

Optionally you can also use these definitions in pure JavaScript instead of TypeScript via JSDoc. Here is an example of a custom action that is bound to the action definition:

/** @typedef {import("dbm-types/dbm-2.1").DBMAction} DBMAction */

/** @type {DBMAction} */
module.exports = {
    name: "My action",
    ...
}

How to contribute

The internal structure of the bot.js and DBM itself is really huge and complex. If you are an advanced user / web developer you could try reverse engineering DBM and updating the types yourself. Otherwise please feel free to open an issue or pull request if anything is missing or not the way it should be. Every contribution is appreciated.

Copyright notice

This module does not provide the actual source code of classes, functions, etc. Only types and interfaces for creating modifications with optional documentation are available. Copyright of the originating source code belongs to Robert Borghese. A copy of Discord Bot Maker is required to be able to use them sensibly.