discord-api-parser
TypeScript icon, indicating that this package has built-in type declarations

4.0.3 • Public • Published

discord-api-parser

A package that works like a wrapper and parses raw Discord API.

This basically accepts the raw HTTP response and puts it into classes with types.

Notes

This is not fully designed to be used as a library, but rather to just help with the RiskyBOT project.

This package is subject to change at any time, and may not be stable (not fully semver).

Examples

Parsing a User

import { User } from "discord-api-parser";

const user = new User(rawUser);

Parsing an Interaction

import { parseRawInteraction } from "discord-api-parser";

const interaction = parseRawInteraction(rawInteraction);

Or parsing an Interaction and knowing the type of interaction:

import { ChatInputInteraction } from "discord-api-parser";

const interaction = new ChatInputInteraction(rawInteraction);

/discord-api-parser/

    Package Sidebar

    Install

    npm i discord-api-parser

    Weekly Downloads

    2

    Version

    4.0.3

    License

    none

    Unpacked Size

    221 kB

    Total Files

    86

    Last publish

    Collaborators

    • riskymh