Socket
Book a DemoInstallSign in
Socket

quick.djs

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quick.djs

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

1.5.1
latest
npmnpm
Version published
Maintainers
3
Created
Source

Table of Contents

  • About
  • Installation
  • Functions and Classes
  • Contribute
  • Credits

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:

SyntaxDescriptionExample
ban()Bans a memberquick.ban(message, 'user id', {title: 'embed title', reason: 'reason', color: 'hex color'}) //"message" is your message event parameter name.
unban()Unbans a memberquick.unban(message, 'user id') //"message" is your message event parameter name.
kick()Kicks a memberquick.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:

SyntaxDescription
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);
    }
})
SyntaxDescriptionExample
snake()Setup a fun little snake gamequick.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:

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

Other

SyntaxDescriptionExample
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

Keywords

js

FAQs

Package last updated on 11 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.