Coder Social home page Coder Social logo

disforge.js's Introduction

Installation

npm i disforge.js

how to use

const Discord = require("discord.js");
const client = new Discord.Client();
const Disforge = require('disforge.js');
const api = new Disforge.Client("Your-Disforge-API-Key-Here");

// Posting manually...
api.postStats(client).then(result => {
    console.log(result)
});

// Posting every hour automatically :sunglasso:
api.autoPost(client).then(result => {
    console.log(result)
});

client.login("YourDiscordBotTokenIsHere");

// You can replace "servers_total_members" with one of the strings below for a specific option OR not provide a value to return an object of all data.
/*
"servers_total_members", "servers", "servers_total_members", "bots", "bots_total_servers", "bots_awaiting_approval", "registered_users", "last_updated"
*/
api.stats("servers_total_members").then(result => {
    console.log(result)
});
// 10m RateLimit on checking votes
client.on("messageCreate", async (msg) => {
    if (msg.author.bot) return;
    if (msg.content.toLowerCase() == ";voted") {
        api.checkVote(client).then(res => {
            console.log(res)
            msg.reply(`${res}`)
        })
    }
})

-> disforge.com

-> disforge.js

disforge.js's People

Contributors

xynnix avatar mezotv avatar dtmcl avatar

Stargazers

 avatar

Forkers

emojigg mezotv

disforge.js's Issues

Can't post server count

Error message:

C:\Users\domin\OneDrive\Dokumente\GitHub\Would-You\node_modules\disforge.js\src\disforge.js:82
        if (Number(bot.shard.count >= 2) && (Number(bot.shard.ids[0]) + 1) == Number(bot.shard.count)) {
                             ^

TypeError: Cannot read properties of null (reading 'count')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.