Added in-code flags support for pterodactyl
This commit is contained in:
@@ -3,6 +3,13 @@ const fs = require("fs")
|
|||||||
const ts = require("typescript")
|
const ts = require("typescript")
|
||||||
const nodepath = require('path')
|
const nodepath = require('path')
|
||||||
|
|
||||||
|
/////////////// STARTUP FLAGS ///////////////
|
||||||
|
const flags = [
|
||||||
|
//add startup flags here (e.g. "--no-compile")
|
||||||
|
]
|
||||||
|
process.argv.push(...flags)
|
||||||
|
/////////////// STARTUP FLAGS ///////////////
|
||||||
|
|
||||||
if (!process.argv.includes("--no-compile")){
|
if (!process.argv.includes("--no-compile")){
|
||||||
//REMOVE EXISTING BUILDS
|
//REMOVE EXISTING BUILDS
|
||||||
console.log("OT: Removing Prebuilds...")
|
console.log("OT: Removing Prebuilds...")
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ const verifyBarMessages = () => {
|
|||||||
|
|
||||||
//add pings
|
//add pings
|
||||||
const pingOptions = option.get("openticket:ticket-message-ping").value
|
const pingOptions = option.get("openticket:ticket-message-ping").value
|
||||||
const pings: string[] = [discord.userMention(user.id)]
|
const pings: string[] = []
|
||||||
|
const creator = ticket.get("openticket:opened-by").value
|
||||||
|
if (creator) pings.push(discord.userMention(creator))
|
||||||
if (pingOptions["@everyone"]) pings.push("@everyone")
|
if (pingOptions["@everyone"]) pings.push("@everyone")
|
||||||
if (pingOptions["@here"]) pings.push("@here")
|
if (pingOptions["@here"]) pings.push("@here")
|
||||||
pingOptions.custom.forEach((ping) => pings.push(discord.roleMention(ping)))
|
pingOptions.custom.forEach((ping) => pings.push(discord.roleMention(ping)))
|
||||||
@@ -669,7 +671,9 @@ const ticketMessages = () => {
|
|||||||
|
|
||||||
//add pings
|
//add pings
|
||||||
const pingOptions = ticket.option.get("openticket:ticket-message-ping").value
|
const pingOptions = ticket.option.get("openticket:ticket-message-ping").value
|
||||||
const pings: string[] = [discord.userMention(user.id)]
|
const pings: string[] = []
|
||||||
|
const creator = ticket.get("openticket:opened-by").value
|
||||||
|
if (creator) pings.push(discord.userMention(creator))
|
||||||
if (pingOptions["@everyone"]) pings.push("@everyone")
|
if (pingOptions["@everyone"]) pings.push("@everyone")
|
||||||
if (pingOptions["@here"]) pings.push("@here")
|
if (pingOptions["@here"]) pings.push("@here")
|
||||||
pingOptions.custom.forEach((ping) => pings.push(discord.roleMention(ping)))
|
pingOptions.custom.forEach((ping) => pings.push(discord.roleMention(ping)))
|
||||||
@@ -682,8 +686,6 @@ const ticketMessages = () => {
|
|||||||
|
|
||||||
//add embed
|
//add embed
|
||||||
if (ticket.option.get("openticket:ticket-message-embed").value.enabled) instance.addEmbed(await embeds.getSafe("openticket:ticket-message").build(source,{guild,channel,user,ticket}))
|
if (ticket.option.get("openticket:ticket-message-embed").value.enabled) instance.addEmbed(await embeds.getSafe("openticket:ticket-message").build(source,{guild,channel,user,ticket}))
|
||||||
|
|
||||||
|
|
||||||
}),
|
}),
|
||||||
new api.ODWorker("openticket:ticket-message-components",1,async (instance,params,source) => {
|
new api.ODWorker("openticket:ticket-message-components",1,async (instance,params,source) => {
|
||||||
const {guild,channel,user,ticket} = params
|
const {guild,channel,user,ticket} = params
|
||||||
|
|||||||
Reference in New Issue
Block a user