0.0.8 • Published 4 years ago

discord-options v0.0.8

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

Installation

To install the module :

npm install --save discord-options@0.0.8

Presentation

Discord options is a module designed to optimize and make the functions easier to use. It is recommended to use the latest version of discord.js to use this module !

Utilisation

All functions :

Server information :

  • [GUILD.ID] //Get server ID
  • [GUILD.NAME] //Get server name
  • [GUILD.OWNER] //Get the name of the creator of the server
  • [GUILD.CHANNELS.SIZE] //Get the total number of channels
  • [GUILD.CHANNELS.TEXT] //Get total number of text channels
  • [GUILD.CHANNELS.VOICE] //Get the total number of voice channels
  • [GUILD.CHANNELS.CATEGORY] //Get the total number of categories

Bot information :

  • [BOT.PING] //Get the latency in ms of the bot

Maintenance (do not work at the moment) :

  • Nothing at the moment.

A short example :

//Module
const Translate = require("discord-options");

//It analyzes the message and replaces if necessary
let text = await Translate.options("The name of this server is [GUILD.ID]", message, client)

//It sends the modified message if necessary
message.channel.send(text)

Or in an embed for example :

//Module
const Translate = require("discord-options");

//Options
var ID = await Translate.options("[GUILD.ID]", message, client)
var NAME = await Translate.options("[GUILD.NAME]", message, client)
var OWNER = await Translate.options("[GUILD.OWNER]", message, client)

//New embed
const embed = new Discord.MessageEmbed()

//Color
embed.setColor("RED")

//Title
embed.setAuthor(`Informations`)

//Options
embed.addField("ID", ID, true)
embed.addField("Name", NAME, true)
embed.addField("Owner", OWNER, true)

//Add picture
embed.setThumbnail("https://i.imgur.com/Pzi3oOY.png")

//A little thought to the module
embed.setFooter("Made with the help of the module discord-options.")

//Message
message.channel.send(embed)
0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago