1.3.2 • Published 4 years ago
multipurpose-package-for-discord v1.3.2
Information for the package:
This package can help you make commands in a single line! This package was mainly made for improving my skills, but you are free to use it!
Packages Required:
discord.js v12
Note:
Update the package to latest version if you had faced any bugs. If still facing bugs, report them here
How To Install:
npm i discord-utility
Example:
const Discord = require("discord.js");
const client = new Discord.Client();
const { Utility } = require("multipurpose-package-for-discord");
const utility = new Utility();
const prefix = 'Your-Prefix-Here'
client.on('ready', () => {
console.log(`Ready! Logged in as ${client.user.tag}!`)
})
client.on('message', async message => {
if(message.content.startsWith(`${prefix}avatar`)) {
let user = message.mentions.users.first() || message.author;
utility.avatar(message, user).catch(console.log); // No need for sending embeds or any message, this line will do all the work for you!
} else if(message.content.startsWith(`${prefix}ping`)) {
// If you use 'bot' as your `new Discord.Client()` You need to do `const client = bot`
utility.ping(message, client).catch(console.log); // Again, no need for sending embeds or any message. Same for all the commands down below!
} else if(message.content.startsWith(`${prefix}serverinfo`)) {
utility.serverinfo(message).catch(console.log);
} else if(message.content.startsWith(`${prefix}userinfo`)) {
let user = message.mentions.users.first() || message.author;
utility.userinfo(message, user).catch(console.log);
} else if(message.content.startsWith(`${prefix}emojify`)) {
utility.emojify(message).catch(console.log);
}
})
client.login('Your Token Here')
Other Methods:
- Utility.catFact(message) : Returns random cat fact.
- Utility.dogFact(message) : Returns random dog fact.
Documentation coming soon...
Will be adding more soon!
1.3.2
4 years ago
1.3.1
4 years ago
1.2.16
4 years ago
1.2.15
4 years ago
1.2.14
4 years ago
1.2.13
4 years ago
1.2.12
4 years ago
1.2.11
4 years ago
1.2.9
4 years ago
1.2.10
4 years ago
1.2.8
4 years ago
1.2.7
4 years ago
1.2.6
4 years ago
1.2.5
4 years ago
1.2.4
4 years ago
1.2.3
4 years ago
1.2.2
4 years ago
1.2.1
4 years ago
1.2.0
4 years ago
1.1.9
4 years ago
1.1.8
4 years ago
1.1.7
4 years ago
1.1.6
4 years ago
1.1.5
4 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.0.1
4 years ago
1.1.0
4 years ago
1.0.0
4 years ago