Message - liam-gen/discord.easy.js GitHub Wiki
Message
Functions
send
sendEmbed
errorMessage
makeSay
makeKick
makeBan
makeStartGiveaway
makeRerollGiveaway
makeEndGiveaway
isSupportedLanguage
setLanguage
setPrefix
translate
Propreties
.send(content)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
content |
String |
no |
none |
Send a message to a channel |
.sendEmbed(title, description, footer, color, fields)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
title |
String |
yes |
none |
Define the title of embed |
description |
String |
yes |
none |
Define the description of embed |
footer |
String |
yes |
none |
Define the footer of embed |
color |
Color |
yes |
#fff |
Define the color of embed |
fields |
JSON |
yes |
none |
Add fields to embed |
.errorMessage(error_content)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
error_content |
String |
no |
none |
Return error embed |
.makeSay(noArgsMsg)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
noArgsMsg |
String |
yes |
:x: You must fill in arguments. |
Return this message if no argument is given |
.makeKick(kickMessage, permission)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
kickMessage |
String |
yes |
I have kicked $user |
Send a message when the user is kicked |
permission |
Permission |
yes |
KICK_MEMBERS |
Check if a user has this permission |
.makeBan(banMessage, permission)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
banMessage |
String |
yes |
I have banned $user |
Send a message when the user is banned |
permission |
Permission |
yes |
BAN_MEMBERS |
Check if a user has this permission |
.makeStartGiveaway(permission, doneMsg)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
permission |
Permission |
yes |
none |
Check if a user has this permission |
doneMsg |
String |
yes |
I started a giveaway in the channel $channel |
Send a message when the giveaway is start |
.makeRerollGiveaway(permission, doneMsg)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
permission |
Permission |
yes |
none |
Check if a user has this permission |
doneMsg |
String |
yes |
Giveaway rerolled! |
Send a message when the giveaway is reroll |
.makeEndGiveaway(permission, doneMsg)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
permission |
Permission |
yes |
none |
Check if a user has this permission |
doneMsg |
String |
yes |
Giveaway will end in less than $time seconds... |
Send a message when the giveaway is end |
.isSupportedLanguage(language)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
SORTIE |
language |
String |
no |
none |
Check if the language exists |
Boolean |
.setLanguage(language)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
language |
String |
no |
none |
Set the bot language |
.setPrefix(prefix)
PARAMETER |
TYPE |
OPTIONAL |
DEFAULT |
DESCRIPTION |
MAX CHARACTERS |
prefix |
String |
no |
none |
Set the bot prefix |
3 |
.translate()
DESCRIPTION |
Translate the given text. Argument 1: from. Argument 2: to. Argument 3 to character limitation: text to translate |