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

discordrpg

v1.0.0

Published

A Node package to make use of the DiscordRPG API easier.

Downloads

2

Readme

discordrpg

A Node package to make use of the DiscordRPG API easier.

NPM

Please note that documentation for all of the function responses can be found by looking at the DiscordRPG API documentation page.

Functions:

getGuild(id) Returns with a guild object.

var DiscordRPG = require('discordrpg');
var drpg = new DiscordRPG('Your API key here');

drpg.getGuild("82a13e23-68fa-8884-dd99-334c0f9f3e6f").then(r => {
    console.log(r.name); //"MadHouse"
});

getGuildItem(id) Returns with a guild item object.

var DiscordRPG = require('discordrpg');
var drpg = new DiscordRPG('Your API key here');

drpg.getGuildItem("1").then(r => {
    console.log(r.name); //"Guild Sign"
});

getAllItems() Returns with an array of all item objects. May take a second to return results.

var DiscordRPG = require('discordrpg');
var drpg = new DiscordRPG('Your API key here');

drpg.getAllItems().then(r => {
    console.log(r[1].name); //"Health Potion"
});

getItem(id) Returns with an item object.

var DiscordRPG = require('discordrpg');
var drpg = new DiscordRPG('Your API key here');

drpg.getItem("1").then(r => {
    console.log(r.name); //"Health Potion"
});

getBotStats() Returns with simple object of bot stats.

var DiscordRPG = require('discordrpg');
var drpg = new DiscordRPG('Your API key here');

drpg.getBotStats().then(r => {
    console.log(r.servers); //58810
});

getTrade(id) Returns with a trade object.

var DiscordRPG = require('discordrpg');
var drpg = new DiscordRPG('Your API key here');

drpg.getTrade("jce5jh30").then(r => {
    console.log(r.type); //"sell"
});

getItemBuyingTrades(id) Returns with array of all trade objects selling id item with buy as their type. May take a second to return results.

var DiscordRPG = require('discordrpg');
var drpg = new DiscordRPG('Your API key here');

drpg.getItemBuyingTrades("110").then(r => {
    console.log(r.trades[1].buy.price); //45
});

getItemSellingTrades(id) Returns with array of all trade objects selling id item with sell as their type. May take a second to return results.

var DiscordRPG = require('discordrpg');
var drpg = new DiscordRPG('Your API key here');

drpg.getItemSellingTrades("110").then(r => {
    console.log(r.trades[1].buy.price); //45
});

getAllTrades() Returns with an array of all trade objects. Will take a few seconds to return results.

var DiscordRPG = require('discordrpg');
var drpg = new DiscordRPG('Your API key here');

drpg.getAllTrades().then(r => {
    console.log(r); //lots of objects
});

getUser(id) Returns with a user object.

var DiscordRPG = require('discordrpg');
var drpg = new DiscordRPG('Your API key here');

drpg.getUser("120627061214806016").then(r => {
    console.log(r.name); //"The Conceptionist"
});