1.0.1 • Published 5 years ago
discordlity v1.0.1
About
Discord Utility is an npm dedicated to the general facility to develop bots with the discord.js library
Installation
Node.js 6.0.0 or newer is required. Ignore any warnings about unmet peer dependencies, as they're all optional.
Windows
npm install discordlity
Linux
pnpm install discordlity
Example Usage
Embed
const dUtil = require("discordlity");
const embed = new dUtil.embed(client, "Message", message.channel)
// The channel is optional, default is message.channel
message.channel.send(embed)
KeyGen
const dUtil = require("discordlity");
const key = dUtil.keyGen() // Output "RANDOMKEY"
message.channel.send(key)
Bar
const dUtil = require("discordlity");
dUtil.progressBar(20, 5)
//20 is the current percentage and 5 the steps that will be shown to reach the limit
MutualGuilds
const dUtil = require("discordlity");
const member = message.mentions.members.first()
const guilds = dUtil.mutualGuilds(client, member)
message.channel.send(guilds.map(guild => guild.name).join("\n"))
Get date
const dUtil = require("discordlity");
dUtil.getDate(new Date())
ReplyMsg
const dUtil = require("discordlity");
const reply = await dUtil.reply(message, "Question", limit)
// The limit is optional, limit default 60000ms
if (reply.collected == "content")