v2.1.0 push 3

This commit is contained in:
DJj123dj
2022-06-09 20:23:34 +02:00
parent 1728c3653a
commit 89a44f3f2f
19 changed files with 148 additions and 58 deletions
+48 -2
View File
@@ -42,14 +42,13 @@ exports.invalidIdChooseFromList = (list) => {
return x
}
//seves
exports.notInATicket = new embed()
.setColor("RED")
.setTitle(":x: You are not in a ticket! :x:")
.setDescription("This command doesn't work outside tickets!")
/**@param {String} message @param {String} title */
exports.success = (title,message) => {
var x = new embed()
.setColor(config.main_color)
@@ -57,4 +56,51 @@ exports.success = (title,message) => {
.setDescription(message)
return x
}
/**@param {String} message @param {String} title */
exports.warning = (title,message) => {
var x = new embed()
.setColor("ORANGE")
.setTitle(":warning: "+title+" :warning:")
.setDescription(message)
return x
}
/**@param {String} message the message @param {String} title the title @param {String} emoji an discord emoji @param {discord.ColorResolvable} color the embed color*/
exports.custom = (title,message,emoji,color) => {
var x = new embed()
.setColor(color)
.setTitle(emoji+" "+title+" "+emoji)
.setDescription(message)
return x
}
/**
*
* @param {"system"|"command"|"info"} type
* @param {String} message
* @param {[{key:String,value:String}]} params
*/
exports.log = async (type,message,params) => {
const chalk = await loadChalk()
var paramstring = ""
if (params){
if (params.length > 0){
params.forEach((p) => {
paramstring = paramstring+p.key+": "+p.value+" "
})
}
}
const parameters = params ? "("+paramstring+")" : " "
if (type == "command"){
console.log(chalk.green("[command] ")+message+" "+chalk.yellow(parameters))
}else if (type == "info"){
console.log(chalk.blue("[info] ")+message+" "+chalk.yellow(parameters))
}else if (type == "system"){
console.log(chalk.green("[system] ")+message+" "+chalk.yellow(parameters))
}
}