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

quick.djs

v1.5.1

Published

A simple to use package to make writing in Discord.js much simpler

Downloads

6

Readme

Table of Contents

About

quick.djs is a simple to use package that makes writing Discord.js bots much faster.

Installation

In order to use quick.djs you must have Node.js v12.0.0 or later insalled

Installing quick.djs:

npm install quick.djs

or

yarn add quick.djs

Functions and Classes

Moderation
const Discord = require('discord.js');
const client = new Discord.Client();
const { Moderation } = require('quick.djs');

const moderation = new Moderation();
const prefix = "!"

client.on("ready", ready => {
    console.log("Online!");
});
    const args = message.content.slice(prefix.length).trim().split(/ +/);
    const command = args.shift().toLowerCase();
client.on("message", async message => {
    if (message.author.bot || !message.content.startsWith(prefix)) return;

    if (command === "ban") {
        const userID = message.mentions.members.first().id; // Make sure to use the "members" property and not users.
        const reason = args.slice(1).join(" ");
        await moderation.ban(message, userID, {title: "User has been banned", reason: reason, color: "RED"});
        //Will also send a message when banned.
    }
});
client.login("TOKEN");

Moderation Functions: | Syntax | Description | Example | |--------- |----------------- |----------------------------------------------------------------------------------------------------------------------------------------------------- | | ban() | Bans a member | quick.ban(message, 'user id', {title: 'embed title', reason: 'reason', color: 'hex color'}) //"message" is your message event parameter name. | | unban() | Unbans a member | quick.unban(message, 'user id') //"message" is your message event parameter name. | | kick() | Kicks a member | quick.kick(message, 'user id', {title: 'embed title', reason: 'reason', color: 'hex color' //"message" is your message event parameter name. |

More to come!

Images
        //Basic Syntax:
        const { Images } = require("quick.djs")
        const images = new Images();
        const image = await images.hug();
        console.log(image);
        //Will console log the image URL.

Image Functions: | Syntax | Description | |---------- |-------------------------- | | hug() | Sends a hug image/gif | | kiss() | Sends a kiss image/gif | | slap() | Sends a slap image/gif | | punch() | Sends a punch image/gif | | wink() | Sends a wink image/gif | | pat() | Sends a pat image/gif | | kill() | Sends a pat image/gif | | cuddle() | Sends a cuddle image/gif | | wafiu() | Sends a wafiu image/gif | PLEASE NOTE: These do not send the image automatically, it only returns the image URL and then from there, you can do things with it.

Games
//Basic Syntax

//REST OF YOUR CODE ABOVE
const Discord = require("discord.js");
const client = new Discord.Client();

const { Games } = require("quick.djs");
client.on("message", message => {
    if (message.content === "snake") {
        const games = new Games();
        games.snake(message);
    }
})

| Syntax | Description | Example | |--------- |------------------------------- |--------------------------------------------------------------------------- | | snake() | Setup a fun little snake game | quick.snake(message) //"message" is your message event parameter name |

Ticket
const Discord = require('discord.js');
const client = new Discord.Client();
const { Ticket } = require('quick.djs');

const ticket = new Ticket();
const prefix = "!"
client.on("ready", ready => {
    console.log("Online!");
});
    
    const args = message.content.slice(prefix.length).trim().split(/ +/);
    const command = args.shift().toLowerCase();

client.on("message", message => {
    if (message.author.bot || !message.content.startsWith(prefix)) return;

    if (command === "ticket") {
        ticket.new(message, 'STAFF ROLE ID HERE', {title: 'New Ticket', description: 'Welcome to this ticket!', color: "RED"}) 
    }
});
client.login("TOKEN");

Ticket Functions:

| Syntax | Description | Example | |---------- |-------------------------- |------------------------------------------------------------------------------------------------------------------- | | new() | Creates a new Ticket. | quick.new(message, 'staff role id' {title: 'title', description: 'embed description', color: 'hex color'}) | | rename() | Renames the channel name | quick.rename(message, 'channelName') //"message" is what you have defined "message" as in your message event. | | delete() | Deletes the channel | quick.delete(message) //"message" is what you have defined "message" as in your message event.

Other

| Syntax | Description | Example | |------------------ |--------------------------------------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------- | | antiSwear() | Prevents people from swearing. | quick.antiSwear(message, "no swearing message") //"message" is your message event parameter name | | blacklistWords() | Blacklist words that people can't say. | quick.blacklistWords(message, "blacklisted word message" {words: ["word1", "word2", "etc"]}) //"message" is your message event parameter name | | memberCount() | Display a member count of your server. | quick.memberCount(client, member, channelID) | | welcome() | Displays a welcome message when users join your server. | quick.welcome(client, message, channelID, GuildMember, embed = true, "custom join message" |

These do not have any classes and are base functions you can use without importing a class

Contribute

Feeling good and want to contribute? Join the Discord server

Credits