Skip to content

A new and better discordprefix package! Easy-to-use, Useful Functions, and more!

Notifications You must be signed in to change notification settings

FluffyDev1/discordprefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discordprefix

discordprefix is a new and good Node.js package, easy-to-use, manage your discord prefixes!

Features

  • ⏱️ Easy to use!
  • 📁 JSON database!
  • 🤖 Custom Prefixes!
  • 😯 Useful Functions! (getArguments, getCommand)

Installation

npm install --save @danielquacks/discord-prefix

Examples

You can read this example code on Github: example.js

Get the prefix of a guild

client.on('message', (message) => {
    let prefix = client.getPrefixOfGuild(message.guild.id);
    console.log(prefix) // "!" or the custom prefix
});

Set the prefix of a guild

client.on('message', (message) => {
    let newPrefix = "~";
    // Returns "Successfully changed prefix to `~`"
    message.channel.send(client.setPrefixOfGuild(message.guild.id, newPrefix));
});

Useful Functions

// message - the message that this function will get the arguments.
getArguments(message);

// args - the arguments that this function will try to get the command.
getCommand(args);

About

A new and better discordprefix package! Easy-to-use, Useful Functions, and more!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors