Minor Improvements + Code Cleanup
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@
|
|||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/rest": "^2.6.1",
|
"@discordjs/rest": "^2.6.1",
|
||||||
"@open-discord-bots/framework": "^0.3.8",
|
"@open-discord-bots/framework": "^0.3.14",
|
||||||
"@types/node": "^22.5.0",
|
"@types/node": "^22.5.0",
|
||||||
"@types/terminal-kit": "^2.5.7",
|
"@types/terminal-kit": "^2.5.7",
|
||||||
"ansis": "^4.2.0",
|
"ansis": "^4.2.0",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:add-ticket-user"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:add-ticket-user"))
|
||||||
opendiscord.actions.get("opendiscord:add-ticket-user").workers.add([
|
opendiscord.actions.get("opendiscord:add-ticket-user").workers.add([
|
||||||
new api.ODWorker("opendiscord:add-ticket-user",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:add-ticket-user",2,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:claim-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:claim-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:claim-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:claim-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:claim-ticket",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:claim-ticket",2,async (instance,params,origin,cancel) => {
|
||||||
@@ -101,7 +101,7 @@ export const registerActions = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerVerifyBars = async () => {
|
export async function registerVerifyBars(){
|
||||||
//CLAIM TICKET TICKET MESSAGE
|
//CLAIM TICKET TICKET MESSAGE
|
||||||
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:claim-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:claim-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
||||||
opendiscord.verifybars.get("opendiscord:claim-ticket-ticket-message").success.add([
|
opendiscord.verifybars.get("opendiscord:claim-ticket-ticket-message").success.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:clear-tickets"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:clear-tickets"))
|
||||||
opendiscord.actions.get("opendiscord:clear-tickets").workers.add([
|
opendiscord.actions.get("opendiscord:clear-tickets").workers.add([
|
||||||
new api.ODWorker("opendiscord:clear-tickets",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:clear-tickets",2,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
|
const interactiveMsgState = opendiscord.states.get("opendiscord:interactive-message")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:close-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:close-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:close-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:close-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:close-ticket",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:close-ticket",2,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as discord from "discord.js"
|
|||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:create-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:create-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:create-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:create-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:create-ticket",3,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:create-ticket",3,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {opendiscord, api, utilities} from "../index.js"
|
import {opendiscord, api, utilities} from "../index.js"
|
||||||
import * as discord from "discord.js"
|
import * as discord from "discord.js"
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:create-ticket-permissions"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:create-ticket-permissions"))
|
||||||
opendiscord.actions.get("opendiscord:create-ticket-permissions").workers.add([
|
opendiscord.actions.get("opendiscord:create-ticket-permissions").workers.add([
|
||||||
new api.ODWorker("opendiscord:check-blacklist",4,(instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:check-blacklist",4,(instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const transcriptConfig = opendiscord.configs.get("opendiscord:transcripts")
|
const transcriptConfig = opendiscord.configs.get("opendiscord:transcripts")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:create-transcript"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:create-transcript"))
|
||||||
opendiscord.actions.get("opendiscord:create-transcript").workers.add([
|
opendiscord.actions.get("opendiscord:create-transcript").workers.add([
|
||||||
new api.ODWorker("opendiscord:select-compiler",4,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:select-compiler",4,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as discord from "discord.js"
|
|||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:delete-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:delete-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:delete-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:delete-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:delete-ticket",3,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:delete-ticket",3,async (instance,params,origin,cancel) => {
|
||||||
@@ -115,7 +115,7 @@ export const registerActions = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerVerifyBars = async () => {
|
export async function registerVerifyBars(){
|
||||||
//DELETE TICKET TICKET MESSAGE
|
//DELETE TICKET TICKET MESSAGE
|
||||||
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:delete-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:delete-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
||||||
opendiscord.verifybars.get("opendiscord:delete-ticket-ticket-message").success.add([
|
opendiscord.verifybars.get("opendiscord:delete-ticket-ticket-message").success.add([
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {opendiscord, api, utilities} from "../index.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//TRANSCRIPT ERROR RETRY
|
//TRANSCRIPT ERROR RETRY
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:transcript-error-retry",/^od:transcript-error-retry_([^_]+)/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:transcript-error-retry",/^od:transcript-error-retry_([^_]+)/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:transcript-error-retry").workers.add([
|
opendiscord.responders.buttons.get("opendiscord:transcript-error-retry").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:move-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:move-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:move-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:move-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:move-ticket",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:move-ticket",2,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:pin-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:pin-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:pin-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:pin-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:pin-ticket",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:pin-ticket",2,async (instance,params,origin,cancel) => {
|
||||||
@@ -96,7 +96,7 @@ export const registerActions = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerVerifyBars = async () => {
|
export async function registerVerifyBars(){
|
||||||
//PIN TICKET TICKET MESSAGE
|
//PIN TICKET TICKET MESSAGE
|
||||||
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:pin-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:pin-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
||||||
opendiscord.verifybars.get("opendiscord:pin-ticket-ticket-message").success.add([
|
opendiscord.verifybars.get("opendiscord:pin-ticket-ticket-message").success.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:reaction-role"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:reaction-role"))
|
||||||
opendiscord.actions.get("opendiscord:reaction-role").workers.add([
|
opendiscord.actions.get("opendiscord:reaction-role").workers.add([
|
||||||
new api.ODWorker("opendiscord:reaction-role",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:reaction-role",2,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:remove-ticket-user"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:remove-ticket-user"))
|
||||||
opendiscord.actions.get("opendiscord:remove-ticket-user").workers.add([
|
opendiscord.actions.get("opendiscord:remove-ticket-user").workers.add([
|
||||||
new api.ODWorker("opendiscord:remove-ticket-user",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:remove-ticket-user",2,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:rename-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:rename-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:rename-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:rename-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:rename-ticket",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:rename-ticket",2,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:reopen-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:reopen-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:reopen-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:reopen-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:reopen-ticket",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:reopen-ticket",2,async (instance,params,origin,cancel) => {
|
||||||
@@ -192,7 +192,7 @@ export const registerActions = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerVerifyBars = async () => {
|
export async function registerVerifyBars(){
|
||||||
//REOPEN TICKET TICKET MESSAGE
|
//REOPEN TICKET TICKET MESSAGE
|
||||||
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:reopen-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:reopen-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
||||||
opendiscord.verifybars.get("opendiscord:reopen-ticket-ticket-message").success.add([
|
opendiscord.verifybars.get("opendiscord:reopen-ticket-ticket-message").success.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:transfer-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:transfer-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:transfer-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:transfer-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:transfer-ticket",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:transfer-ticket",2,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:unclaim-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:unclaim-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:unclaim-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:unclaim-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:unclaim-ticket",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:unclaim-ticket",2,async (instance,params,origin,cancel) => {
|
||||||
@@ -126,7 +126,7 @@ export const registerActions = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerVerifyBars = async () => {
|
export async function registerVerifyBars(){
|
||||||
//UNCLAIM TICKET TICKET MESSAGE
|
//UNCLAIM TICKET TICKET MESSAGE
|
||||||
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:unclaim-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:unclaim-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
||||||
opendiscord.verifybars.get("opendiscord:unclaim-ticket-ticket-message").success.add([
|
opendiscord.verifybars.get("opendiscord:unclaim-ticket-ticket-message").success.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:unpin-ticket"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:unpin-ticket"))
|
||||||
opendiscord.actions.get("opendiscord:unpin-ticket").workers.add([
|
opendiscord.actions.get("opendiscord:unpin-ticket").workers.add([
|
||||||
new api.ODWorker("opendiscord:unpin-ticket",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:unpin-ticket",2,async (instance,params,origin,cancel) => {
|
||||||
@@ -87,7 +87,7 @@ export const registerActions = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerVerifyBars = async () => {
|
export async function registerVerifyBars(){
|
||||||
//UNPIN TICKET TICKET MESSAGE
|
//UNPIN TICKET TICKET MESSAGE
|
||||||
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:unpin-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
opendiscord.verifybars.add(new api.ODVerifyBar("opendiscord:unpin-ticket-ticket-message",opendiscord.builders.messages.getSafe("opendiscord:verifybar-ticket-message"),!generalConfig.data.system.disableVerifyBars))
|
||||||
opendiscord.verifybars.get("opendiscord:unpin-ticket-ticket-message").success.add([
|
opendiscord.verifybars.get("opendiscord:unpin-ticket-ticket-message").success.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:update-ticket-priority"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:update-ticket-priority"))
|
||||||
opendiscord.actions.get("opendiscord:update-ticket-priority").workers.add([
|
opendiscord.actions.get("opendiscord:update-ticket-priority").workers.add([
|
||||||
new api.ODWorker("opendiscord:update-ticket-priority",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:update-ticket-priority",2,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as discord from "discord.js"
|
|||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
|
|
||||||
export const registerActions = async () => {
|
export async function registerActions(){
|
||||||
opendiscord.actions.add(new api.ODAction("opendiscord:update-ticket-topic"))
|
opendiscord.actions.add(new api.ODAction("opendiscord:update-ticket-topic"))
|
||||||
opendiscord.actions.get("opendiscord:update-ticket-topic").workers.add([
|
opendiscord.actions.get("opendiscord:update-ticket-topic").workers.add([
|
||||||
new api.ODWorker("opendiscord:update-ticket-topic",2,async (instance,params,origin,cancel) => {
|
new api.ODWorker("opendiscord:update-ticket-topic",2,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const dropdowns = opendiscord.builders.dropdowns
|
const dropdowns = opendiscord.builders.dropdowns
|
||||||
|
|
||||||
export const registerAllDropdowns = async () => {
|
export async function registerAllDropdowns(){
|
||||||
panelDropdowns()
|
panelDropdowns()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const embeds = opendiscord.builders.embeds
|
|||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerAllEmbeds = async () => {
|
export async function registerAllEmbeds(){
|
||||||
errorEmbeds()
|
errorEmbeds()
|
||||||
helpMenuEmbeds()
|
helpMenuEmbeds()
|
||||||
statsEmbeds()
|
statsEmbeds()
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const files = opendiscord.builders.files
|
|||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
const transcriptConfig = opendiscord.configs.get("opendiscord:transcripts")
|
const transcriptConfig = opendiscord.configs.get("opendiscord:transcripts")
|
||||||
|
|
||||||
export const registerAllFiles = async () => {
|
export async function registerAllFiles(){
|
||||||
transcriptFiles()
|
transcriptFiles()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const embeds = opendiscord.builders.embeds
|
|||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerAllMessages = async () => {
|
export async function registerAllMessages(){
|
||||||
verifyBarMessages()
|
verifyBarMessages()
|
||||||
errorMessages()
|
errorMessages()
|
||||||
helpMenuMessages()
|
helpMenuMessages()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as discord from "discord.js"
|
|||||||
const modals = opendiscord.builders.modals
|
const modals = opendiscord.builders.modals
|
||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
|
|
||||||
export const registerAllModals = async () => {
|
export async function registerAllModals(){
|
||||||
ticketModals()
|
ticketModals()
|
||||||
}
|
}
|
||||||
const ticketModals = () => {
|
const ticketModals = () => {
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//ADD COMMAND RESPONDER
|
//ADD COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:add",generalConfig.data.prefix,"add"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:add",generalConfig.data.prefix,"add"))
|
||||||
opendiscord.responders.commands.get("opendiscord:add").workers.add([
|
opendiscord.responders.commands.get("opendiscord:add").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//AUTOCLOSE COMMAND RESPONDER
|
//AUTOCLOSE COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:autoclose",generalConfig.data.prefix,/^autoclose/))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:autoclose",generalConfig.data.prefix,/^autoclose/))
|
||||||
opendiscord.responders.commands.get("opendiscord:autoclose").workers.add([
|
opendiscord.responders.commands.get("opendiscord:autoclose").workers.add([
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {opendiscord, api, utilities} from "../index.js"
|
import {opendiscord, api, utilities} from "../index.js"
|
||||||
import * as discord from "discord.js"
|
import * as discord from "discord.js"
|
||||||
|
|
||||||
export const registerAutocompleteResponders = async () => {
|
export async function registerAutocompleteResponders(){
|
||||||
//PANEL ID AUTOCOMPLETE
|
//PANEL ID AUTOCOMPLETE
|
||||||
opendiscord.responders.autocomplete.add(new api.ODAutocompleteResponder("opendiscord:panel-id","panel","id"))
|
opendiscord.responders.autocomplete.add(new api.ODAutocompleteResponder("opendiscord:panel-id","panel","id"))
|
||||||
opendiscord.responders.autocomplete.get("opendiscord:panel-id").workers.add(new api.ODWorker("opendiscord:panel-id",0,async (instance,params,origin,cancel) => {
|
opendiscord.responders.autocomplete.get("opendiscord:panel-id").workers.add(new api.ODWorker("opendiscord:panel-id",0,async (instance,params,origin,cancel) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//AUTODELETE COMMAND RESPONDER
|
//AUTODELETE COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:autodelete",generalConfig.data.prefix,/^autodelete/))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:autodelete",generalConfig.data.prefix,/^autodelete/))
|
||||||
opendiscord.responders.commands.get("opendiscord:autodelete").workers.add([
|
opendiscord.responders.commands.get("opendiscord:autodelete").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//BLACKLIST COMMAND RESPONDER
|
//BLACKLIST COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:blacklist",generalConfig.data.prefix,/^blacklist/))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:blacklist",generalConfig.data.prefix,/^blacklist/))
|
||||||
opendiscord.responders.commands.get("opendiscord:blacklist").workers.add([
|
opendiscord.responders.commands.get("opendiscord:blacklist").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//CLAIM COMMAND RESPONDER
|
//CLAIM COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:claim",generalConfig.data.prefix,"claim"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:claim",generalConfig.data.prefix,"claim"))
|
||||||
opendiscord.responders.commands.get("opendiscord:claim").workers.add([
|
opendiscord.responders.commands.get("opendiscord:claim").workers.add([
|
||||||
@@ -65,7 +65,7 @@ export const registerCommandResponders = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//CLAIM TICKET BUTTON RESPONDER
|
//CLAIM TICKET BUTTON RESPONDER
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:claim-ticket",/^od:claim-ticket/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:claim-ticket",/^od:claim-ticket/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:claim-ticket").workers.add(
|
opendiscord.responders.buttons.get("opendiscord:claim-ticket").workers.add(
|
||||||
@@ -79,7 +79,7 @@ export const registerButtonResponders = async () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerModalResponders = async () => {
|
export async function registerModalResponders(){
|
||||||
//CLAIM WITH REASON MODAL RESPONDER
|
//CLAIM WITH REASON MODAL RESPONDER
|
||||||
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:claim-ticket-reason",/^od:claim-ticket-reason_/))
|
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:claim-ticket-reason",/^od:claim-ticket-reason_/))
|
||||||
opendiscord.responders.modals.get("opendiscord:claim-ticket-reason").workers.add([
|
opendiscord.responders.modals.get("opendiscord:claim-ticket-reason").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//CLEAR COMMAND RESPONDER
|
//CLEAR COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:clear",generalConfig.data.prefix,"clear"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:clear",generalConfig.data.prefix,"clear"))
|
||||||
opendiscord.responders.commands.get("opendiscord:clear").workers.add([
|
opendiscord.responders.commands.get("opendiscord:clear").workers.add([
|
||||||
@@ -61,7 +61,7 @@ export const registerCommandResponders = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//CLEAR CONTINUE BUTTON RESPONDER
|
//CLEAR CONTINUE BUTTON RESPONDER
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:clear-continue",/^od:clear-continue_/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:clear-continue",/^od:clear-continue_/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:clear-continue").workers.add(
|
opendiscord.responders.buttons.get("opendiscord:clear-continue").workers.add(
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as discord from "discord.js"
|
|||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//CLOSE COMMAND RESPONDER
|
//CLOSE COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:close",generalConfig.data.prefix,"close"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:close",generalConfig.data.prefix,"close"))
|
||||||
opendiscord.responders.commands.get("opendiscord:close").workers.add([
|
opendiscord.responders.commands.get("opendiscord:close").workers.add([
|
||||||
@@ -91,7 +91,7 @@ export const registerButtonResponders = async () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerModalResponders = async () => {
|
export async function registerModalResponders(){
|
||||||
//CLOSE WITH REASON MODAL RESPONDER
|
//CLOSE WITH REASON MODAL RESPONDER
|
||||||
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:close-ticket-reason",/^od:close-ticket-reason_/))
|
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:close-ticket-reason",/^od:close-ticket-reason_/))
|
||||||
opendiscord.responders.modals.get("opendiscord:close-ticket-reason").workers.add([
|
opendiscord.responders.modals.get("opendiscord:close-ticket-reason").workers.add([
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as discord from "discord.js"
|
|||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//DELETE COMMAND RESPONDER
|
//DELETE COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:delete",generalConfig.data.prefix,"delete"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:delete",generalConfig.data.prefix,"delete"))
|
||||||
opendiscord.responders.commands.get("opendiscord:delete").workers.add([
|
opendiscord.responders.commands.get("opendiscord:delete").workers.add([
|
||||||
@@ -81,7 +81,7 @@ export const registerCommandResponders = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//DELETE TICKET BUTTON RESPONDER
|
//DELETE TICKET BUTTON RESPONDER
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:delete-ticket",/^od:delete-ticket/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:delete-ticket",/^od:delete-ticket/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:delete-ticket").workers.add(
|
opendiscord.responders.buttons.get("opendiscord:delete-ticket").workers.add(
|
||||||
@@ -97,7 +97,7 @@ export const registerButtonResponders = async () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerModalResponders = async () => {
|
export async function registerModalResponders(){
|
||||||
//REOPEN WITH REASON MODAL RESPONDER
|
//REOPEN WITH REASON MODAL RESPONDER
|
||||||
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:delete-ticket-reason",/^od:delete-ticket-reason_/))
|
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:delete-ticket-reason",/^od:delete-ticket-reason_/))
|
||||||
opendiscord.responders.modals.get("opendiscord:delete-ticket-reason").workers.add([
|
opendiscord.responders.modals.get("opendiscord:delete-ticket-reason").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//HELP COMMAND RESPONDER
|
//HELP COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:help",generalConfig.data.prefix,"help"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:help",generalConfig.data.prefix,"help"))
|
||||||
opendiscord.responders.commands.get("opendiscord:help").workers.add([
|
opendiscord.responders.commands.get("opendiscord:help").workers.add([
|
||||||
@@ -40,7 +40,7 @@ export const registerCommandResponders = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//HELP MENU SWITCH BUTTON RESPONDER
|
//HELP MENU SWITCH BUTTON RESPONDER
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:help-menu-switch",/^od:help-menu-switch_(slash|text)/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:help-menu-switch",/^od:help-menu-switch_(slash|text)/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:help-menu-switch").workers.add(
|
opendiscord.responders.buttons.get("opendiscord:help-menu-switch").workers.add(
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//MOVE COMMAND RESPONDER
|
//MOVE COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:move",generalConfig.data.prefix,"move"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:move",generalConfig.data.prefix,"move"))
|
||||||
opendiscord.responders.commands.get("opendiscord:move").workers.add([
|
opendiscord.responders.commands.get("opendiscord:move").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//PANEL COMMAND RESPONDER
|
//PANEL COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:panel",generalConfig.data.prefix,/^panel/))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:panel",generalConfig.data.prefix,/^panel/))
|
||||||
opendiscord.responders.commands.get("opendiscord:panel").workers.add([
|
opendiscord.responders.commands.get("opendiscord:panel").workers.add([
|
||||||
|
|||||||
+3
-3
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//PIN COMMAND RESPONDER
|
//PIN COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:pin",generalConfig.data.prefix,"pin"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:pin",generalConfig.data.prefix,"pin"))
|
||||||
opendiscord.responders.commands.get("opendiscord:pin").workers.add([
|
opendiscord.responders.commands.get("opendiscord:pin").workers.add([
|
||||||
@@ -97,7 +97,7 @@ export const registerCommandResponders = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//PIN TICKET BUTTON RESPONDER
|
//PIN TICKET BUTTON RESPONDER
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:pin-ticket",/^od:pin-ticket/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:pin-ticket",/^od:pin-ticket/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:pin-ticket").workers.add(
|
opendiscord.responders.buttons.get("opendiscord:pin-ticket").workers.add(
|
||||||
@@ -111,7 +111,7 @@ export const registerButtonResponders = async () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerModalResponders = async () => {
|
export async function registerModalResponders(){
|
||||||
//PIN WITH REASON MODAL RESPONDER
|
//PIN WITH REASON MODAL RESPONDER
|
||||||
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:pin-ticket-reason",/^od:pin-ticket-reason_/))
|
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:pin-ticket-reason",/^od:pin-ticket-reason_/))
|
||||||
opendiscord.responders.modals.get("opendiscord:pin-ticket-reason").workers.add([
|
opendiscord.responders.modals.get("opendiscord:pin-ticket-reason").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//PRIORITY COMMAND RESPONDER
|
//PRIORITY COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:priority",generalConfig.data.prefix,"priority"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:priority",generalConfig.data.prefix,"priority"))
|
||||||
opendiscord.responders.commands.get("opendiscord:priority").workers.add([
|
opendiscord.responders.commands.get("opendiscord:priority").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//REMOVE COMMAND RESPONDER
|
//REMOVE COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:remove",generalConfig.data.prefix,"remove"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:remove",generalConfig.data.prefix,"remove"))
|
||||||
opendiscord.responders.commands.get("opendiscord:remove").workers.add([
|
opendiscord.responders.commands.get("opendiscord:remove").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//RENAME COMMAND RESPONDER
|
//RENAME COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:rename",generalConfig.data.prefix,"rename"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:rename",generalConfig.data.prefix,"rename"))
|
||||||
opendiscord.responders.commands.get("opendiscord:rename").workers.add([
|
opendiscord.responders.commands.get("opendiscord:rename").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//REOPEN COMMAND RESPONDER
|
//REOPEN COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:reopen",generalConfig.data.prefix,"reopen"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:reopen",generalConfig.data.prefix,"reopen"))
|
||||||
opendiscord.responders.commands.get("opendiscord:reopen").workers.add([
|
opendiscord.responders.commands.get("opendiscord:reopen").workers.add([
|
||||||
@@ -64,7 +64,7 @@ export const registerCommandResponders = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//REOPEN TICKET BUTTON RESPONDER
|
//REOPEN TICKET BUTTON RESPONDER
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:reopen-ticket",/^od:reopen-ticket/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:reopen-ticket",/^od:reopen-ticket/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:reopen-ticket").workers.add(
|
opendiscord.responders.buttons.get("opendiscord:reopen-ticket").workers.add(
|
||||||
@@ -79,7 +79,7 @@ export const registerButtonResponders = async () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerModalResponders = async () => {
|
export async function registerModalResponders(){
|
||||||
//REOPEN WITH REASON MODAL RESPONDER
|
//REOPEN WITH REASON MODAL RESPONDER
|
||||||
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:reopen-ticket-reason",/^od:reopen-ticket-reason_/))
|
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:reopen-ticket-reason",/^od:reopen-ticket-reason_/))
|
||||||
opendiscord.responders.modals.get("opendiscord:reopen-ticket-reason").workers.add([
|
opendiscord.responders.modals.get("opendiscord:reopen-ticket-reason").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//ROLE OPTION BUTTON RESPONDER
|
//ROLE OPTION BUTTON RESPONDER
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:role-option",/^od:role-option_/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:role-option",/^od:role-option_/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:role-option").workers.add(
|
opendiscord.responders.buttons.get("opendiscord:role-option").workers.add(
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//STATS COMMAND RESPONDER
|
//STATS COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:stats",generalConfig.data.prefix,/^stats/))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:stats",generalConfig.data.prefix,/^stats/))
|
||||||
opendiscord.responders.commands.get("opendiscord:stats").workers.add([
|
opendiscord.responders.commands.get("opendiscord:stats").workers.add([
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ async function checkTicketCreationPerms(instance:api.ODButtonResponderInstance|a
|
|||||||
}else return true
|
}else return true
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//TICKET COMMAND RESPONDER
|
//TICKET COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:ticket",generalConfig.data.prefix,/^ticket/))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:ticket",generalConfig.data.prefix,/^ticket/))
|
||||||
opendiscord.responders.commands.get("opendiscord:ticket").workers.add([
|
opendiscord.responders.commands.get("opendiscord:ticket").workers.add([
|
||||||
@@ -85,7 +85,7 @@ export const registerCommandResponders = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//TICKET OPTION BUTTON RESPONDER
|
//TICKET OPTION BUTTON RESPONDER
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:ticket-option",/^od:ticket-option_/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:ticket-option",/^od:ticket-option_/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:ticket-option").workers.add(
|
opendiscord.responders.buttons.get("opendiscord:ticket-option").workers.add(
|
||||||
@@ -129,7 +129,7 @@ export const registerButtonResponders = async () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerDropdownResponders = async () => {
|
export async function registerDropdownResponders(){
|
||||||
//PANEL DROPDOWN TICKETS DROPDOWN RESPONDER
|
//PANEL DROPDOWN TICKETS DROPDOWN RESPONDER
|
||||||
opendiscord.responders.dropdowns.add(new api.ODDropdownResponder("opendiscord:panel-dropdown-tickets",/^od:panel-dropdown_/))
|
opendiscord.responders.dropdowns.add(new api.ODDropdownResponder("opendiscord:panel-dropdown-tickets",/^od:panel-dropdown_/))
|
||||||
opendiscord.responders.dropdowns.get("opendiscord:panel-dropdown-tickets").workers.add(
|
opendiscord.responders.dropdowns.get("opendiscord:panel-dropdown-tickets").workers.add(
|
||||||
@@ -181,7 +181,7 @@ export const registerDropdownResponders = async () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerModalResponders = async () => {
|
export async function registerModalResponders(){
|
||||||
//TICKET QUESTIONS RESPONDER
|
//TICKET QUESTIONS RESPONDER
|
||||||
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:ticket-questions",/^od:ticket-questions_/))
|
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:ticket-questions",/^od:ticket-questions_/))
|
||||||
opendiscord.responders.modals.get("opendiscord:ticket-questions").workers.add([
|
opendiscord.responders.modals.get("opendiscord:ticket-questions").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//TOPIC COMMAND RESPONDER
|
//TOPIC COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:topic",generalConfig.data.prefix,"topic"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:topic",generalConfig.data.prefix,"topic"))
|
||||||
opendiscord.responders.commands.get("opendiscord:topic").workers.add([
|
opendiscord.responders.commands.get("opendiscord:topic").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//TRANSFER COMMAND RESPONDER
|
//TRANSFER COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:transfer",generalConfig.data.prefix,"transfer"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:transfer",generalConfig.data.prefix,"transfer"))
|
||||||
opendiscord.responders.commands.get("opendiscord:transfer").workers.add([
|
opendiscord.responders.commands.get("opendiscord:transfer").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//UNCLAIM COMMAND RESPONDER
|
//UNCLAIM COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:unclaim",generalConfig.data.prefix,"unclaim"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:unclaim",generalConfig.data.prefix,"unclaim"))
|
||||||
opendiscord.responders.commands.get("opendiscord:unclaim").workers.add([
|
opendiscord.responders.commands.get("opendiscord:unclaim").workers.add([
|
||||||
@@ -64,7 +64,7 @@ export const registerCommandResponders = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//UNCLAIM TICKET BUTTON RESPONDER
|
//UNCLAIM TICKET BUTTON RESPONDER
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:unclaim-ticket",/^od:unclaim-ticket/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:unclaim-ticket",/^od:unclaim-ticket/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:unclaim-ticket").workers.add(
|
opendiscord.responders.buttons.get("opendiscord:unclaim-ticket").workers.add(
|
||||||
@@ -78,7 +78,7 @@ export const registerButtonResponders = async () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerModalResponders = async () => {
|
export async function registerModalResponders(){
|
||||||
//UNCLAIM WITH REASON MODAL RESPONDER
|
//UNCLAIM WITH REASON MODAL RESPONDER
|
||||||
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:unclaim-ticket-reason",/^od:unclaim-ticket-reason_/))
|
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:unclaim-ticket-reason",/^od:unclaim-ticket-reason_/))
|
||||||
opendiscord.responders.modals.get("opendiscord:unclaim-ticket-reason").workers.add([
|
opendiscord.responders.modals.get("opendiscord:unclaim-ticket-reason").workers.add([
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
|
|
||||||
export const registerCommandResponders = async () => {
|
export async function registerCommandResponders(){
|
||||||
//UNPIN COMMAND RESPONDER
|
//UNPIN COMMAND RESPONDER
|
||||||
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:unpin",generalConfig.data.prefix,"unpin"))
|
opendiscord.responders.commands.add(new api.ODCommandResponder("opendiscord:unpin",generalConfig.data.prefix,"unpin"))
|
||||||
opendiscord.responders.commands.get("opendiscord:unpin").workers.add([
|
opendiscord.responders.commands.get("opendiscord:unpin").workers.add([
|
||||||
@@ -64,7 +64,7 @@ export const registerCommandResponders = async () => {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerButtonResponders = async () => {
|
export async function registerButtonResponders(){
|
||||||
//UNPIN TICKET BUTTON RESPONDER
|
//UNPIN TICKET BUTTON RESPONDER
|
||||||
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:unpin-ticket",/^od:unpin-ticket/))
|
opendiscord.responders.buttons.add(new api.ODButtonResponder("opendiscord:unpin-ticket",/^od:unpin-ticket/))
|
||||||
opendiscord.responders.buttons.get("opendiscord:unpin-ticket").workers.add(
|
opendiscord.responders.buttons.get("opendiscord:unpin-ticket").workers.add(
|
||||||
@@ -78,7 +78,7 @@ export const registerButtonResponders = async () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerModalResponders = async () => {
|
export async function registerModalResponders(){
|
||||||
//UNPIN WITH REASON MODAL RESPONDER
|
//UNPIN WITH REASON MODAL RESPONDER
|
||||||
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:unpin-ticket-reason",/^od:unpin-ticket-reason_/))
|
opendiscord.responders.modals.add(new api.ODModalResponder("opendiscord:unpin-ticket-reason",/^od:unpin-ticket-reason_/))
|
||||||
opendiscord.responders.modals.get("opendiscord:unpin-ticket-reason").workers.add([
|
opendiscord.responders.modals.get("opendiscord:unpin-ticket-reason").workers.add([
|
||||||
|
|||||||
@@ -234,21 +234,21 @@ export class ODTicketOption extends ODOption {
|
|||||||
super(id,"opendiscord:ticket",data)
|
super(id,"opendiscord:ticket",data)
|
||||||
}
|
}
|
||||||
|
|
||||||
get<OptionId extends keyof ODTicketOptionIdMappings>(id:OptionId): ODTicketOptionIdMappings[OptionId]
|
get<OptionId extends keyof api.ODNoGeneric<ODTicketOptionIdMappings>>(id:OptionId): ODTicketOptionIdMappings[OptionId]
|
||||||
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
||||||
return super.get(id)
|
return super.get(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
remove<OptionId extends keyof ODTicketOptionIdMappings>(id:OptionId): ODTicketOptionIdMappings[OptionId]
|
remove<OptionId extends keyof api.ODNoGeneric<ODTicketOptionIdMappings>>(id:OptionId): ODTicketOptionIdMappings[OptionId]
|
||||||
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
||||||
return super.remove(id)
|
return super.remove(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
exists(id:keyof ODTicketOptionIdMappings): boolean
|
exists(id:keyof api.ODNoGeneric<ODTicketOptionIdMappings>): boolean
|
||||||
exists(id:api.ODValidId): boolean
|
exists(id:api.ODValidId): boolean
|
||||||
|
|
||||||
exists(id:api.ODValidId): boolean {
|
exists(id:api.ODValidId): boolean {
|
||||||
@@ -274,21 +274,21 @@ export class ODWebsiteOption extends ODOption {
|
|||||||
super(id,"opendiscord:website",data)
|
super(id,"opendiscord:website",data)
|
||||||
}
|
}
|
||||||
|
|
||||||
get<OptionId extends keyof ODWebsiteOptionIdMappings>(id:OptionId): ODWebsiteOptionIdMappings[OptionId]
|
get<OptionId extends keyof api.ODNoGeneric<ODWebsiteOptionIdMappings>>(id:OptionId): ODWebsiteOptionIdMappings[OptionId]
|
||||||
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
||||||
return super.get(id)
|
return super.get(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
remove<OptionId extends keyof ODWebsiteOptionIdMappings>(id:OptionId): ODWebsiteOptionIdMappings[OptionId]
|
remove<OptionId extends keyof api.ODNoGeneric<ODWebsiteOptionIdMappings>>(id:OptionId): ODWebsiteOptionIdMappings[OptionId]
|
||||||
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
||||||
return super.remove(id)
|
return super.remove(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
exists(id:keyof ODWebsiteOptionIdMappings): boolean
|
exists(id:keyof api.ODNoGeneric<ODWebsiteOptionIdMappings>): boolean
|
||||||
exists(id:api.ODValidId): boolean
|
exists(id:api.ODValidId): boolean
|
||||||
|
|
||||||
exists(id:api.ODValidId): boolean {
|
exists(id:api.ODValidId): boolean {
|
||||||
@@ -314,21 +314,21 @@ export class ODRoleOption extends ODOption {
|
|||||||
super(id,"opendiscord:role",data)
|
super(id,"opendiscord:role",data)
|
||||||
}
|
}
|
||||||
|
|
||||||
get<OptionId extends keyof ODRoleOptionIdMappings>(id:OptionId): ODRoleOptionIdMappings[OptionId]
|
get<OptionId extends keyof api.ODNoGeneric<ODRoleOptionIdMappings>>(id:OptionId): ODRoleOptionIdMappings[OptionId]
|
||||||
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
get(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
||||||
return super.get(id)
|
return super.get(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
remove<OptionId extends keyof ODRoleOptionIdMappings>(id:OptionId): ODRoleOptionIdMappings[OptionId]
|
remove<OptionId extends keyof api.ODNoGeneric<ODRoleOptionIdMappings>>(id:OptionId): ODRoleOptionIdMappings[OptionId]
|
||||||
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
remove(id:api.ODValidId): ODOptionData<api.ODValidJsonType>|null {
|
||||||
return super.remove(id)
|
return super.remove(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
exists(id:keyof ODRoleOptionIdMappings): boolean
|
exists(id:keyof api.ODNoGeneric<ODRoleOptionIdMappings>): boolean
|
||||||
exists(id:api.ODValidId): boolean
|
exists(id:api.ODValidId): boolean
|
||||||
|
|
||||||
exists(id:api.ODValidId): boolean {
|
exists(id:api.ODValidId): boolean {
|
||||||
|
|||||||
@@ -112,21 +112,21 @@ export class ODPanel extends api.ODManager<ODPanelData<api.ODValidJsonType>> {
|
|||||||
return new ODPanel(json.id,json.data.map((data) => new ODPanelData(data.id,data.value)))
|
return new ODPanel(json.id,json.data.map((data) => new ODPanelData(data.id,data.value)))
|
||||||
}
|
}
|
||||||
|
|
||||||
get<PanelId extends keyof ODPanelIdMappings>(id:PanelId): ODPanelIdMappings[PanelId]
|
get<PanelId extends keyof api.ODNoGeneric<ODPanelIdMappings>>(id:PanelId): ODPanelIdMappings[PanelId]
|
||||||
get(id:api.ODValidId): ODPanelData<api.ODValidJsonType>|null
|
get(id:api.ODValidId): ODPanelData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
get(id:api.ODValidId): ODPanelData<api.ODValidJsonType>|null {
|
get(id:api.ODValidId): ODPanelData<api.ODValidJsonType>|null {
|
||||||
return super.get(id)
|
return super.get(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
remove<PanelId extends keyof ODPanelIdMappings>(id:PanelId): ODPanelIdMappings[PanelId]
|
remove<PanelId extends keyof api.ODNoGeneric<ODPanelIdMappings>>(id:PanelId): ODPanelIdMappings[PanelId]
|
||||||
remove(id:api.ODValidId): ODPanelData<api.ODValidJsonType>|null
|
remove(id:api.ODValidId): ODPanelData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
remove(id:api.ODValidId): ODPanelData<api.ODValidJsonType>|null {
|
remove(id:api.ODValidId): ODPanelData<api.ODValidJsonType>|null {
|
||||||
return super.remove(id)
|
return super.remove(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
exists(id:keyof ODPanelIdMappings): boolean
|
exists(id:keyof api.ODNoGeneric<ODPanelIdMappings>): boolean
|
||||||
exists(id:api.ODValidId): boolean
|
exists(id:api.ODValidId): boolean
|
||||||
|
|
||||||
exists(id:api.ODValidId): boolean {
|
exists(id:api.ODValidId): boolean {
|
||||||
|
|||||||
@@ -168,21 +168,21 @@ export class ODShortQuestion extends ODQuestion {
|
|||||||
super(id,"opendiscord:short",data)
|
super(id,"opendiscord:short",data)
|
||||||
}
|
}
|
||||||
|
|
||||||
get<QuestionId extends keyof ODShortQuestionIdMappings>(id:QuestionId): ODShortQuestionIdMappings[QuestionId]
|
get<QuestionId extends keyof api.ODNoGeneric<ODShortQuestionIdMappings>>(id:QuestionId): ODShortQuestionIdMappings[QuestionId]
|
||||||
get(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null
|
get(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
get(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null {
|
get(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null {
|
||||||
return super.get(id)
|
return super.get(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
remove<QuestionId extends keyof ODShortQuestionIdMappings>(id:QuestionId): ODShortQuestionIdMappings[QuestionId]
|
remove<QuestionId extends keyof api.ODNoGeneric<ODShortQuestionIdMappings>>(id:QuestionId): ODShortQuestionIdMappings[QuestionId]
|
||||||
remove(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null
|
remove(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
remove(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null {
|
remove(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null {
|
||||||
return super.remove(id)
|
return super.remove(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
exists(id:keyof ODShortQuestionIdMappings): boolean
|
exists(id:keyof api.ODNoGeneric<ODShortQuestionIdMappings>): boolean
|
||||||
exists(id:api.ODValidId): boolean
|
exists(id:api.ODValidId): boolean
|
||||||
|
|
||||||
exists(id:api.ODValidId): boolean {
|
exists(id:api.ODValidId): boolean {
|
||||||
@@ -208,21 +208,21 @@ export class ODParagraphQuestion extends ODQuestion {
|
|||||||
super(id,"opendiscord:paragraph",data)
|
super(id,"opendiscord:paragraph",data)
|
||||||
}
|
}
|
||||||
|
|
||||||
get<QuestionId extends keyof ODParagraphQuestionIdMappings>(id:QuestionId): ODParagraphQuestionIdMappings[QuestionId]
|
get<QuestionId extends keyof api.ODNoGeneric<ODParagraphQuestionIdMappings>>(id:QuestionId): ODParagraphQuestionIdMappings[QuestionId]
|
||||||
get(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null
|
get(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
get(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null {
|
get(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null {
|
||||||
return super.get(id)
|
return super.get(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
remove<QuestionId extends keyof ODParagraphQuestionIdMappings>(id:QuestionId): ODParagraphQuestionIdMappings[QuestionId]
|
remove<QuestionId extends keyof api.ODNoGeneric<ODParagraphQuestionIdMappings>>(id:QuestionId): ODParagraphQuestionIdMappings[QuestionId]
|
||||||
remove(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null
|
remove(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
remove(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null {
|
remove(id:api.ODValidId): ODQuestionData<api.ODValidJsonType>|null {
|
||||||
return super.remove(id)
|
return super.remove(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
exists(id:keyof ODParagraphQuestionIdMappings): boolean
|
exists(id:keyof api.ODNoGeneric<ODParagraphQuestionIdMappings>): boolean
|
||||||
exists(id:api.ODValidId): boolean
|
exists(id:api.ODValidId): boolean
|
||||||
|
|
||||||
exists(id:api.ODValidId): boolean {
|
exists(id:api.ODValidId): boolean {
|
||||||
|
|||||||
@@ -100,21 +100,21 @@ export class ODRole extends api.ODManager<ODRoleData<api.ODValidJsonType>> {
|
|||||||
return new ODRole(json.id,json.data.map((data) => new ODRoleData(data.id,data.value)))
|
return new ODRole(json.id,json.data.map((data) => new ODRoleData(data.id,data.value)))
|
||||||
}
|
}
|
||||||
|
|
||||||
get<OptionId extends keyof ODRoleIdMappings>(id:OptionId): ODRoleIdMappings[OptionId]
|
get<OptionId extends keyof api.ODNoGeneric<ODRoleIdMappings>>(id:OptionId): ODRoleIdMappings[OptionId]
|
||||||
get(id:api.ODValidId): ODRoleData<api.ODValidJsonType>|null
|
get(id:api.ODValidId): ODRoleData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
get(id:api.ODValidId): ODRoleData<api.ODValidJsonType>|null {
|
get(id:api.ODValidId): ODRoleData<api.ODValidJsonType>|null {
|
||||||
return super.get(id)
|
return super.get(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
remove<OptionId extends keyof ODRoleIdMappings>(id:OptionId): ODRoleIdMappings[OptionId]
|
remove<OptionId extends keyof api.ODNoGeneric<ODRoleIdMappings>>(id:OptionId): ODRoleIdMappings[OptionId]
|
||||||
remove(id:api.ODValidId): ODRoleData<api.ODValidJsonType>|null
|
remove(id:api.ODValidId): ODRoleData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
remove(id:api.ODValidId): ODRoleData<api.ODValidJsonType>|null {
|
remove(id:api.ODValidId): ODRoleData<api.ODValidJsonType>|null {
|
||||||
return super.remove(id)
|
return super.remove(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
exists(id:keyof ODRoleIdMappings): boolean
|
exists(id:keyof api.ODNoGeneric<ODRoleIdMappings>): boolean
|
||||||
exists(id:api.ODValidId): boolean
|
exists(id:api.ODValidId): boolean
|
||||||
|
|
||||||
exists(id:api.ODValidId): boolean {
|
exists(id:api.ODValidId): boolean {
|
||||||
|
|||||||
@@ -246,21 +246,21 @@ export class ODTicket extends api.ODManager<ODTicketData<api.ODValidJsonType>> {
|
|||||||
return new ODTicket(json.id,option,json.data.map((data) => new ODTicketData(data.id,data.value)))
|
return new ODTicket(json.id,option,json.data.map((data) => new ODTicketData(data.id,data.value)))
|
||||||
}
|
}
|
||||||
|
|
||||||
get<OptionId extends keyof ODTicketIdMappings>(id:OptionId): ODTicketIdMappings[OptionId]
|
get<OptionId extends keyof api.ODNoGeneric<ODTicketIdMappings>>(id:OptionId): ODTicketIdMappings[OptionId]
|
||||||
get(id:api.ODValidId): ODTicketData<api.ODValidJsonType>|null
|
get(id:api.ODValidId): ODTicketData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
get(id:api.ODValidId): ODTicketData<api.ODValidJsonType>|null {
|
get(id:api.ODValidId): ODTicketData<api.ODValidJsonType>|null {
|
||||||
return super.get(id)
|
return super.get(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
remove<OptionId extends keyof ODTicketIdMappings>(id:OptionId): ODTicketIdMappings[OptionId]
|
remove<OptionId extends keyof api.ODNoGeneric<ODTicketIdMappings>>(id:OptionId): ODTicketIdMappings[OptionId]
|
||||||
remove(id:api.ODValidId): ODTicketData<api.ODValidJsonType>|null
|
remove(id:api.ODValidId): ODTicketData<api.ODValidJsonType>|null
|
||||||
|
|
||||||
remove(id:api.ODValidId): ODTicketData<api.ODValidJsonType>|null {
|
remove(id:api.ODValidId): ODTicketData<api.ODValidJsonType>|null {
|
||||||
return super.remove(id)
|
return super.remove(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
exists(id:keyof ODTicketIdMappings): boolean
|
exists(id:keyof api.ODNoGeneric<ODTicketIdMappings>): boolean
|
||||||
exists(id:api.ODValidId): boolean
|
exists(id:api.ODValidId): boolean
|
||||||
|
|
||||||
exists(id:api.ODValidId): boolean {
|
exists(id:api.ODValidId): boolean {
|
||||||
|
|||||||
+12
-12
@@ -9,8 +9,7 @@ import * as discord from "discord.js"
|
|||||||
* It's used to generate typescript declarations for this class.
|
* It's used to generate typescript declarations for this class.
|
||||||
*/
|
*/
|
||||||
export interface ODStateManagerIdMappings extends api.ODStateManagerIdConstraint {
|
export interface ODStateManagerIdMappings extends api.ODStateManagerIdConstraint {
|
||||||
"opendiscord:message-origin":ODMessageOriginState,
|
"opendiscord:interactive-message":ODInteractiveMessageState,
|
||||||
"opendiscord:verifybar":ODVerifybarState,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
@@ -22,17 +21,18 @@ export interface ODStateManagerIdMappings extends api.ODStateManagerIdConstraint
|
|||||||
*/
|
*/
|
||||||
export class ODMappedStateManager extends api.ODStateManager<ODStateManagerIdMappings> {}
|
export class ODMappedStateManager extends api.ODStateManager<ODStateManagerIdMappings> {}
|
||||||
|
|
||||||
/**## ODMessageOriginState `class
|
/**## ODInteractiveMessageState `class
|
||||||
* A special class with types for the Open Ticket message origin states.
|
* A special class with state types for interactive Open Ticket message.
|
||||||
*/
|
*/
|
||||||
export class ODMessageOriginState extends api.ODState<{
|
export class ODInteractiveMessageState extends api.ODState<{
|
||||||
|
/**The method this message was generated with. */
|
||||||
messageOrigin:"slash"|"text"|"button"|"dropdown"|"modal"|"other",
|
messageOrigin:"slash"|"text"|"button"|"dropdown"|"modal"|"other",
|
||||||
|
/**The type of message. Used when editing messages. */
|
||||||
messageType:"ticket-message"|"close-message"|"reopen-message"|"autoclose-message"|"claim-message"|"unclaim-message"|"pin-message"|"unpin-message",
|
messageType:"ticket-message"|"close-message"|"reopen-message"|"autoclose-message"|"claim-message"|"unclaim-message"|"pin-message"|"unpin-message",
|
||||||
|
/**A reason this interactive message was generated. */
|
||||||
|
messageReason?:string|null,
|
||||||
|
/**The original author of this interactive message. */
|
||||||
|
messageAuthor?:string,
|
||||||
|
/**Additional data of this interactive message. */
|
||||||
|
messageExtraData?:any,
|
||||||
},false,false> {}
|
},false,false> {}
|
||||||
|
|
||||||
/**## ODVerifybarState `class
|
|
||||||
* A special class with types for the Open Ticket verifybar states.
|
|
||||||
*/
|
|
||||||
export class ODVerifybarState extends api.ODState<{
|
|
||||||
verifybarId:string,
|
|
||||||
},false,true> {}
|
|
||||||
@@ -8,23 +8,23 @@ import * as api from "@open-discord-bots/framework/api"
|
|||||||
* It's used to generate typescript declarations for this class.
|
* It's used to generate typescript declarations for this class.
|
||||||
*/
|
*/
|
||||||
export interface ODVerifyBarManagerIdMappings extends api.ODVerifyBarManagerIdConstraint {
|
export interface ODVerifyBarManagerIdMappings extends api.ODVerifyBarManagerIdConstraint {
|
||||||
"opendiscord:claim-ticket-ticket-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:claim-ticket",failureWorkerIds:"opendiscord:back-to-ticket-message"},
|
"opendiscord:close-ticket":api.ODVerifyBar<"accept"|"cancel"|"accept-with-reason","opendiscord:close-ticket">,
|
||||||
"opendiscord:claim-ticket-unclaim-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:claim-ticket",failureWorkerIds:"opendiscord:back-to-unclaim-message"},
|
"opendiscord:reopen-ticket":api.ODVerifyBar<"accept"|"cancel"|"accept-with-reason","opendiscord:reopen-ticket">,
|
||||||
"opendiscord:unclaim-ticket-ticket-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:unclaim-ticket",failureWorkerIds:"opendiscord:back-to-ticket-message"},
|
"opendiscord:delete-ticket":api.ODVerifyBar<"accept"|"cancel"|"accept-with-reason","opendiscord:delete-ticket">,
|
||||||
"opendiscord:unclaim-ticket-claim-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:unclaim-ticket",failureWorkerIds:"opendiscord:back-to-claim-message"},
|
"opendiscord:claim-ticket":api.ODVerifyBar<"accept"|"cancel"|"accept-with-reason","opendiscord:claim-ticket">,
|
||||||
"opendiscord:pin-ticket-ticket-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:pin-ticket",failureWorkerIds:"opendiscord:back-to-ticket-message"},
|
"opendiscord:unclaim-ticket":api.ODVerifyBar<"accept"|"cancel"|"accept-with-reason","opendiscord:unclaim-ticket">,
|
||||||
"opendiscord:pin-ticket-unpin-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:pin-ticket",failureWorkerIds:"opendiscord:back-to-unpin-message"},
|
"opendiscord:pin-ticket":api.ODVerifyBar<"accept"|"cancel"|"accept-with-reason","opendiscord:pin-ticket">,
|
||||||
"opendiscord:unpin-ticket-ticket-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:unpin-ticket",failureWorkerIds:"opendiscord:back-to-ticket-message"},
|
"opendiscord:unpin-ticket":api.ODVerifyBar<"accept"|"cancel"|"accept-with-reason","opendiscord:unpin-ticket">,
|
||||||
"opendiscord:unpin-ticket-pin-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:unpin-ticket",failureWorkerIds:"opendiscord:back-to-pin-message"},
|
}
|
||||||
"opendiscord:close-ticket-ticket-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:close-ticket",failureWorkerIds:"opendiscord:back-to-ticket-message"},
|
|
||||||
"opendiscord:close-ticket-reopen-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:close-ticket",failureWorkerIds:"opendiscord:back-to-reopen-message"},
|
/**## ODVerifyButtonId `enum`
|
||||||
"opendiscord:reopen-ticket-ticket-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:reopen-ticket",failureWorkerIds:"opendiscord:back-to-ticket-message"},
|
* Frequently used button ids in Open Ticket verify bars.
|
||||||
"opendiscord:reopen-ticket-close-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:reopen-ticket",failureWorkerIds:"opendiscord:back-to-close-message"},
|
*/
|
||||||
"opendiscord:reopen-ticket-autoclose-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:reopen-ticket",failureWorkerIds:"opendiscord:back-to-autoclose-message"},
|
export enum ODVerifyButtonId {
|
||||||
"opendiscord:delete-ticket-ticket-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:delete-ticket",failureWorkerIds:"opendiscord:back-to-ticket-message"}
|
Cancel="cancel",
|
||||||
"opendiscord:delete-ticket-close-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:delete-ticket",failureWorkerIds:"opendiscord:back-to-close-message"}
|
Accept="accept",
|
||||||
"opendiscord:delete-ticket-reopen-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:delete-ticket",failureWorkerIds:"opendiscord:back-to-reopen-message"}
|
AcceptWithReason="accept-with-reason",
|
||||||
"opendiscord:delete-ticket-autoclose-message":{successWorkerIds:"opendiscord:permissions"|"opendiscord:delete-ticket",failureWorkerIds:"opendiscord:back-to-autoclose-message"}
|
AcceptWithoutTranscript="accept-without-transcript"
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ async function saveAllVersionsToDatabase(){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadVersionMigrationSystem = async () => {
|
export async function loadVersionMigrationSystem(){
|
||||||
//ENTER MIGRATION CONTEXT
|
//ENTER MIGRATION CONTEXT
|
||||||
await preloadMigrationContext()
|
await preloadMigrationContext()
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const generalConfig = opendiscord.configs.get("opendiscord:general")
|
|||||||
* - Check (./src/builders), (./src/actions), (./src/data) & (./src/commands) in general in the areas that were changed.
|
* - Check (./src/builders), (./src/actions), (./src/data) & (./src/commands) in general in the areas that were changed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const loadAllConfigCheckers = async () => {
|
export async function loadAllConfigCheckers(){
|
||||||
opendiscord.checkers.add(new api.ODChecker("opendiscord:general",opendiscord.checkers.storage,0,opendiscord.configs.get("opendiscord:general"),defaultGeneralStructure,{cliDisplayName:"General Config",cliDisplayDescription:"Configure the bot token, status, colors, permissions & more."}))
|
opendiscord.checkers.add(new api.ODChecker("opendiscord:general",opendiscord.checkers.storage,0,opendiscord.configs.get("opendiscord:general"),defaultGeneralStructure,{cliDisplayName:"General Config",cliDisplayDescription:"Configure the bot token, status, colors, permissions & more."}))
|
||||||
opendiscord.checkers.add(new api.ODChecker("opendiscord:questions",opendiscord.checkers.storage,2,opendiscord.configs.get("opendiscord:questions"),defaultQuestionsStructure,{cliDisplayName:"Questions Config",cliDisplayDescription:"Create, modify & delete questions which are used in options."}))
|
opendiscord.checkers.add(new api.ODChecker("opendiscord:questions",opendiscord.checkers.storage,2,opendiscord.configs.get("opendiscord:questions"),defaultQuestionsStructure,{cliDisplayName:"Questions Config",cliDisplayDescription:"Create, modify & delete questions which are used in options."}))
|
||||||
opendiscord.checkers.add(new api.ODChecker("opendiscord:options",opendiscord.checkers.storage,1,opendiscord.configs.get("opendiscord:options"),defaultOptionsStructure,{cliDisplayName:"Options Config",cliDisplayDescription:"Create, modify & delete options which are used in panels."}))
|
opendiscord.checkers.add(new api.ODChecker("opendiscord:options",opendiscord.checkers.storage,1,opendiscord.configs.get("opendiscord:options"),defaultOptionsStructure,{cliDisplayName:"Options Config",cliDisplayDescription:"Create, modify & delete options which are used in panels."}))
|
||||||
@@ -30,13 +30,13 @@ export const loadAllConfigCheckers = async () => {
|
|||||||
opendiscord.checkers.add(new api.ODChecker("opendiscord:transcripts",opendiscord.checkers.storage,0,opendiscord.configs.get("opendiscord:transcripts"),defaultTranscriptsStructure,{cliDisplayName:"Transcript Config",cliDisplayDescription:"Configure everything related to transcripts."}))
|
opendiscord.checkers.add(new api.ODChecker("opendiscord:transcripts",opendiscord.checkers.storage,0,opendiscord.configs.get("opendiscord:transcripts"),defaultTranscriptsStructure,{cliDisplayName:"Transcript Config",cliDisplayDescription:"Configure everything related to transcripts."}))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadAllConfigCheckerFunctions = async () => {
|
export async function loadAllConfigCheckerFunctions(){
|
||||||
opendiscord.checkers.functions.add(new api.ODCheckerFunction("opendiscord:unused-options",defaultUnusedOptionsFunction))
|
opendiscord.checkers.functions.add(new api.ODCheckerFunction("opendiscord:unused-options",defaultUnusedOptionsFunction))
|
||||||
opendiscord.checkers.functions.add(new api.ODCheckerFunction("opendiscord:unused-questions",defaultUnusedQuestionsFunction))
|
opendiscord.checkers.functions.add(new api.ODCheckerFunction("opendiscord:unused-questions",defaultUnusedQuestionsFunction))
|
||||||
opendiscord.checkers.functions.add(new api.ODCheckerFunction("opendiscord:dropdown-options",defaultDropdownOptionsFunction))
|
opendiscord.checkers.functions.add(new api.ODCheckerFunction("opendiscord:dropdown-options",defaultDropdownOptionsFunction))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadAllConfigCheckerTranslations = async () => {
|
export async function loadAllConfigCheckerTranslations(){
|
||||||
if ((generalConfig && generalConfig.data.system && generalConfig.data.system.useTranslatedConfigChecker) ? generalConfig.data.system.useTranslatedConfigChecker : false){
|
if ((generalConfig && generalConfig.data.system && generalConfig.data.system.useTranslatedConfigChecker) ? generalConfig.data.system.useTranslatedConfigChecker : false){
|
||||||
registerDefaultCheckerSystemTranslations(opendiscord.checkers.translation,opendiscord.languages) //translate checker system text
|
registerDefaultCheckerSystemTranslations(opendiscord.checkers.translation,opendiscord.languages) //translate checker system text
|
||||||
registerDefaultCheckerMessageTranslations(opendiscord.checkers.translation,opendiscord.languages) //translate checker messages
|
registerDefaultCheckerMessageTranslations(opendiscord.checkers.translation,opendiscord.languages) //translate checker messages
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const statsDatabase = opendiscord.databases.get("opendiscord:stats")
|
|||||||
const optionDatabase = opendiscord.databases.get("opendiscord:options")
|
const optionDatabase = opendiscord.databases.get("opendiscord:options")
|
||||||
const mainServer = opendiscord.client.mainServer
|
const mainServer = opendiscord.client.mainServer
|
||||||
|
|
||||||
export const loadAllCode = async () => {
|
export async function loadAllCode(){
|
||||||
if (!generalConfig || !mainServer || !globalDatabase || !userDatabase || !ticketDatabase || !statsDatabase || !optionDatabase) return
|
if (!generalConfig || !mainServer || !globalDatabase || !userDatabase || !ticketDatabase || !statsDatabase || !optionDatabase) return
|
||||||
|
|
||||||
loadCommandErrorHandlingCode()
|
loadCommandErrorHandlingCode()
|
||||||
@@ -20,7 +20,7 @@ export const loadAllCode = async () => {
|
|||||||
loadAutoCode()
|
loadAutoCode()
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadCommandErrorHandlingCode = async () => {
|
export async function loadCommandErrorHandlingCode(){
|
||||||
//COMMAND ERROR HANDLING
|
//COMMAND ERROR HANDLING
|
||||||
opendiscord.code.add(new api.ODCode("opendiscord:command-error-handling",14,() => {
|
opendiscord.code.add(new api.ODCode("opendiscord:command-error-handling",14,() => {
|
||||||
//invalid/missing options
|
//invalid/missing options
|
||||||
@@ -56,7 +56,7 @@ export const loadCommandErrorHandlingCode = async () => {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadStartListeningInteractionsCode = async () => {
|
export async function loadStartListeningInteractionsCode(){
|
||||||
//START LISTENING TO INTERACTIONS
|
//START LISTENING TO INTERACTIONS
|
||||||
opendiscord.code.add(new api.ODCode("opendiscord:start-listening-interactions",13,() => {
|
opendiscord.code.add(new api.ODCode("opendiscord:start-listening-interactions",13,() => {
|
||||||
opendiscord.client.slashCommands.startListeningToInteractions()
|
opendiscord.client.slashCommands.startListeningToInteractions()
|
||||||
@@ -66,7 +66,7 @@ export const loadStartListeningInteractionsCode = async () => {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadDatabaseCleanersCode = async () => {
|
export async function loadDatabaseCleanersCode(){
|
||||||
if (!mainServer) return
|
if (!mainServer) return
|
||||||
|
|
||||||
//PANEL DATABASE CLEANER
|
//PANEL DATABASE CLEANER
|
||||||
@@ -282,7 +282,7 @@ export const loadDatabaseCleanersCode = async () => {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadPanelAutoUpdateCode = async () => {
|
export async function loadPanelAutoUpdateCode(){
|
||||||
//PANEL AUTO UPDATE
|
//PANEL AUTO UPDATE
|
||||||
opendiscord.code.add(new api.ODCode("opendiscord:panel-auto-update",7,async () => {
|
opendiscord.code.add(new api.ODCode("opendiscord:panel-auto-update",7,async () => {
|
||||||
const globalDatabase = opendiscord.databases.get("opendiscord:global")
|
const globalDatabase = opendiscord.databases.get("opendiscord:global")
|
||||||
@@ -316,7 +316,7 @@ export const loadPanelAutoUpdateCode = async () => {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadDatabaseSaversCode = async () => {
|
export async function loadDatabaseSaversCode(){
|
||||||
//TICKET SAVER
|
//TICKET SAVER
|
||||||
opendiscord.code.add(new api.ODCode("opendiscord:ticket-saver",6,() => {
|
opendiscord.code.add(new api.ODCode("opendiscord:ticket-saver",6,() => {
|
||||||
const mainVersion = opendiscord.versions.get("opendiscord:version")
|
const mainVersion = opendiscord.versions.get("opendiscord:version")
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const lang = opendiscord.languages
|
|||||||
* - Check all files, test the bot carefully & try a lot of different scenario's with different settings.
|
* - Check all files, test the bot carefully & try a lot of different scenario's with different settings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const loadAllSlashCommands = async () => {
|
export async function loadAllSlashCommands(){
|
||||||
const commands = opendiscord.client.slashCommands
|
const commands = opendiscord.client.slashCommands
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
if (!generalConfig) return
|
if (!generalConfig) return
|
||||||
@@ -642,7 +642,7 @@ export const loadAllSlashCommands = async () => {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadAllTextCommands = async () => {
|
export async function loadAllTextCommands(){
|
||||||
const commands = opendiscord.client.textCommands
|
const commands = opendiscord.client.textCommands
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
if (!generalConfig) return
|
if (!generalConfig) return
|
||||||
@@ -1216,7 +1216,7 @@ export const loadAllTextCommands = async () => {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadAllContextMenus = async () => {
|
export async function loadAllContextMenus(){
|
||||||
const menus = opendiscord.client.contextMenus
|
const menus = opendiscord.client.contextMenus
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
if (!generalConfig) return
|
if (!generalConfig) return
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import * as fjs from "formatted-json-stringify"
|
|||||||
* - Check (./src/builders), (./src/actions), (./src/data) & (./src/commands) in general in the areas that were changed.
|
* - Check (./src/builders), (./src/actions), (./src/data) & (./src/commands) in general in the areas that were changed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const loadAllConfigs = async () => {
|
export async function loadAllConfigs(){
|
||||||
const devconfigFlag = opendiscord.flags.get("opendiscord:dev-config")
|
const devconfigFlag = opendiscord.flags.get("opendiscord:dev-config")
|
||||||
const isDevconfig = devconfigFlag ? devconfigFlag.value : false
|
const isDevconfig = devconfigFlag ? devconfigFlag.value : false
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
|
|
||||||
export const loadAllCooldowns = async () => {
|
export async function loadAllCooldowns(){
|
||||||
await opendiscord.options.loopAll((option) => {
|
await opendiscord.options.loopAll((option) => {
|
||||||
if (!(option instanceof api.ODTicketOption)) return
|
if (!(option instanceof api.ODTicketOption)) return
|
||||||
loadTicketOptionCooldown(option)
|
loadTicketOptionCooldown(option)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import * as fjs from "formatted-json-stringify"
|
|||||||
const devdatabaseFlag = opendiscord.flags.get("opendiscord:dev-database")
|
const devdatabaseFlag = opendiscord.flags.get("opendiscord:dev-database")
|
||||||
const isDevdatabase = devdatabaseFlag ? devdatabaseFlag.value : false
|
const isDevdatabase = devdatabaseFlag ? devdatabaseFlag.value : false
|
||||||
|
|
||||||
export const loadAllDatabases = async () => {
|
export async function loadAllDatabases(){
|
||||||
opendiscord.databases.add(defaultGlobalDatabase)
|
opendiscord.databases.add(defaultGlobalDatabase)
|
||||||
opendiscord.databases.add(defaultStatsDatabase)
|
opendiscord.databases.add(defaultStatsDatabase)
|
||||||
opendiscord.databases.add(defaultTicketsDatabase)
|
opendiscord.databases.add(defaultTicketsDatabase)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
|
|
||||||
export const loadAllFlags = async () => {
|
export async function loadAllFlags(){
|
||||||
opendiscord.flags.add(new api.ODFlag("opendiscord:no-migration","No Migration","Disable Open Ticket data migration on update!","--no-migration",["-nm"]))
|
opendiscord.flags.add(new api.ODFlag("opendiscord:no-migration","No Migration","Disable Open Ticket data migration on update!","--no-migration",["-nm"]))
|
||||||
opendiscord.flags.add(new api.ODFlag("opendiscord:dev-config","Developer Config","Use the configs in /devconfig/ instead of /config/!","--dev-config",["-dc"]))
|
opendiscord.flags.add(new api.ODFlag("opendiscord:dev-config","Developer Config","Use the configs in /devconfig/ instead of /config/!","--dev-config",["-dc"]))
|
||||||
opendiscord.flags.add(new api.ODFlag("opendiscord:dev-database","Developer Database","Use the databases in /devdatabase/ instead of /database/!","--dev-database",["-dd"]))
|
opendiscord.flags.add(new api.ODFlag("opendiscord:dev-database","Developer Database","Use the databases in /devdatabase/ instead of /database/!","--dev-database",["-dd"]))
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const lang = opendiscord.languages
|
|||||||
* - Check all files, test the bot carefully & try a lot of different scenario's with different settings.
|
* - Check all files, test the bot carefully & try a lot of different scenario's with different settings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const loadAllHelpMenuCategories = async () => {
|
export async function loadAllHelpMenuCategories(){
|
||||||
const helpmenu = opendiscord.helpmenu
|
const helpmenu = opendiscord.helpmenu
|
||||||
|
|
||||||
helpmenu.add(new api.ODHelpMenuCategory("opendiscord:general",5,utilities.emojiTitle("📎",lang.getTranslation("helpMenu.categories.general"))))
|
helpmenu.add(new api.ODHelpMenuCategory("opendiscord:general",5,utilities.emojiTitle("📎",lang.getTranslation("helpMenu.categories.general"))))
|
||||||
@@ -24,7 +24,7 @@ export const loadAllHelpMenuCategories = async () => {
|
|||||||
helpmenu.add(new api.ODHelpMenuCategory("opendiscord:extra",0,utilities.emojiTitle("✨",lang.getTranslation("helpMenu.categories.extra"))))
|
helpmenu.add(new api.ODHelpMenuCategory("opendiscord:extra",0,utilities.emojiTitle("✨",lang.getTranslation("helpMenu.categories.extra"))))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadAllHelpMenuComponents = async () => {
|
export async function loadAllHelpMenuComponents(){
|
||||||
const helpmenu = opendiscord.helpmenu
|
const helpmenu = opendiscord.helpmenu
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
if (!generalConfig) return
|
if (!generalConfig) return
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {opendiscord, api, utilities} from "../../index.js"
|
|||||||
* - Update the Open Ticket Documentation.
|
* - Update the Open Ticket Documentation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const loadAllLanguages = async () => {
|
export async function loadAllLanguages(){
|
||||||
//register languages
|
//register languages
|
||||||
opendiscord.languages.add(new api.ODJsonLanguage("opendiscord:custom","custom.json"))
|
opendiscord.languages.add(new api.ODJsonLanguage("opendiscord:custom","custom.json"))
|
||||||
opendiscord.languages.add(new api.ODJsonLanguage("opendiscord:english","english.json"))
|
opendiscord.languages.add(new api.ODJsonLanguage("opendiscord:english","english.json"))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
|
|
||||||
export const loadAllLiveStatusSources = async () => {
|
export async function loadAllLiveStatusSources(){
|
||||||
//DEFAULT DJDJ DEV
|
//DEFAULT DJDJ DEV
|
||||||
opendiscord.livestatus.add(new api.ODLiveStatusUrlSource(opendiscord,"opendiscord:default-djdj-dev","https://raw.githubusercontent.com/open-discord-bots/open-ticket/refs/heads/dev/src/livestatus.json"))
|
opendiscord.livestatus.add(new api.ODLiveStatusUrlSource(opendiscord,"opendiscord:default-djdj-dev","https://raw.githubusercontent.com/open-discord-bots/open-ticket/refs/heads/dev/src/livestatus.json"))
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
import * as discord from "discord.js"
|
import * as discord from "discord.js"
|
||||||
|
|
||||||
export const loadAllPermissions = async () => {
|
export async function loadAllPermissions(){
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
if (!generalConfig) return
|
if (!generalConfig) return
|
||||||
const mainServer = opendiscord.client.mainServer
|
const mainServer = opendiscord.client.mainServer
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
|
|
||||||
export const loadAllPosts = async () => {
|
export async function loadAllPosts(){
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
if (!generalConfig) return
|
if (!generalConfig) return
|
||||||
const transcriptConfig = opendiscord.configs.get("opendiscord:transcripts")
|
const transcriptConfig = opendiscord.configs.get("opendiscord:transcripts")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
|
|
||||||
export const loadAllProgressBarRenderers = async () => {
|
export async function loadAllProgressBarRenderers(){
|
||||||
const defaultSettings: api.ODDefaultProgressBarRendererSettings = {
|
const defaultSettings: api.ODDefaultProgressBarRendererSettings = {
|
||||||
borderColor:"gray",
|
borderColor:"gray",
|
||||||
filledBarColor:"openticket",
|
filledBarColor:"openticket",
|
||||||
@@ -53,7 +53,7 @@ export const loadAllProgressBarRenderers = async () => {
|
|||||||
opendiscord.progressbars.renderers.add(new api.ODDefaultProgressBarRenderer("opendiscord:time-min-renderer",timeMinRendererSettings))
|
opendiscord.progressbars.renderers.add(new api.ODDefaultProgressBarRenderer("opendiscord:time-min-renderer",timeMinRendererSettings))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadAllProgressBars = async () => {
|
export async function loadAllProgressBars(){
|
||||||
const fractRenderer = opendiscord.progressbars.renderers.get("opendiscord:fraction-renderer")
|
const fractRenderer = opendiscord.progressbars.renderers.get("opendiscord:fraction-renderer")
|
||||||
|
|
||||||
//SLASH COMMAND REMOVE (doesn't have correct amount yet)
|
//SLASH COMMAND REMOVE (doesn't have correct amount yet)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
import ansis from "ansis"
|
import ansis from "ansis"
|
||||||
|
|
||||||
export const loadAllStartScreenComponents = async () => {
|
export async function loadAllStartScreenComponents(){
|
||||||
//LOGO
|
//LOGO
|
||||||
opendiscord.startscreen.add(new api.ODStartScreenLogoComponent("opendiscord:logo",1000,[
|
opendiscord.startscreen.add(new api.ODStartScreenLogoComponent("opendiscord:logo",1000,[
|
||||||
" ██████╗ ██████╗ ███████╗███╗ ██╗ ████████╗██╗ ██████╗██╗ ██╗███████╗████████╗ ",
|
" ██████╗ ██████╗ ███████╗███╗ ██╗ ████████╗██╗ ██████╗██╗ ██╗███████╗████████╗ ",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
|
|
||||||
export const loadAllStates = async () => {
|
export async function loadAllStates(){
|
||||||
const stateDatabase = opendiscord.databases.get("opendiscord:message-states")
|
const stateDatabase = opendiscord.databases.get("opendiscord:message-states")
|
||||||
|
|
||||||
opendiscord.states.add(new api.ODMessageOriginState("opendiscord:message-origin",opendiscord.client,stateDatabase,{}))
|
opendiscord.states.add(new api.ODInteractiveMessageState("opendiscord:interactive-message",opendiscord.client,stateDatabase,{}))
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ import * as discord from "discord.js"
|
|||||||
const stats = opendiscord.statistics
|
const stats = opendiscord.statistics
|
||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
|
|
||||||
export const loadAllStatisticScopes = async () => {
|
export async function loadAllStatisticScopes(){
|
||||||
stats.add(new api.ODStatisticGlobalScope("opendiscord:global",utilities.emojiTitle("📊",lang.getTranslation("stats.scopes.global"))))
|
stats.add(new api.ODStatisticGlobalScope("opendiscord:global",utilities.emojiTitle("📊",lang.getTranslation("stats.scopes.global"))))
|
||||||
stats.add(new api.ODStatisticGlobalScope("opendiscord:system",utilities.emojiTitle("⚙️",lang.getTranslation("stats.scopes.system"))))
|
stats.add(new api.ODStatisticGlobalScope("opendiscord:system",utilities.emojiTitle("⚙️",lang.getTranslation("stats.scopes.system"))))
|
||||||
stats.add(new api.ODStatisticScope("opendiscord:user",utilities.emojiTitle("📊",lang.getTranslation("stats.scopes.user"))))
|
stats.add(new api.ODStatisticScope("opendiscord:user",utilities.emojiTitle("📊",lang.getTranslation("stats.scopes.user"))))
|
||||||
@@ -13,7 +13,7 @@ export const loadAllStatisticScopes = async () => {
|
|||||||
stats.add(new api.ODStatisticScope("opendiscord:messages",utilities.emojiTitle("💬",lang.getTranslation("stats.scopes.messages"))))
|
stats.add(new api.ODStatisticScope("opendiscord:messages",utilities.emojiTitle("💬",lang.getTranslation("stats.scopes.messages"))))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadAllStatistics = async () => {
|
export async function loadAllStatistics(){
|
||||||
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
const generalConfig = opendiscord.configs.get("opendiscord:general")
|
||||||
if (!generalConfig) return
|
if (!generalConfig) return
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
|
|
||||||
export const loadAllBlacklistedUsers = async () => {
|
export async function loadAllBlacklistedUsers(){
|
||||||
const userDatabase = opendiscord.databases.get("opendiscord:users")
|
const userDatabase = opendiscord.databases.get("opendiscord:users")
|
||||||
if (!userDatabase) return
|
if (!userDatabase) return
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
|
|
||||||
export const loadAllOptions = async () => {
|
export async function loadAllOptions(){
|
||||||
const optionConfig = opendiscord.configs.get("opendiscord:options")
|
const optionConfig = opendiscord.configs.get("opendiscord:options")
|
||||||
if (!optionConfig) return
|
if (!optionConfig) return
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import * as discord from "discord.js"
|
|||||||
|
|
||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
|
|
||||||
export const loadAllPanels = async () => {
|
export async function loadAllPanels(){
|
||||||
const panelConfig = opendiscord.configs.get("opendiscord:panels")
|
const panelConfig = opendiscord.configs.get("opendiscord:panels")
|
||||||
if (!panelConfig) return
|
if (!panelConfig) return
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {opendiscord, api, utilities} from "../../index.js"
|
|||||||
|
|
||||||
const lang = opendiscord.languages
|
const lang = opendiscord.languages
|
||||||
|
|
||||||
export const loadAllPriorityLevels = async () => {
|
export async function loadAllPriorityLevels(){
|
||||||
opendiscord.priorities.add(new api.ODPriorityLevel("opendiscord:urgent",5,"urgent",lang.getTranslation("priorities.urgent"),"🔴","🔴"))
|
opendiscord.priorities.add(new api.ODPriorityLevel("opendiscord:urgent",5,"urgent",lang.getTranslation("priorities.urgent"),"🔴","🔴"))
|
||||||
opendiscord.priorities.add(new api.ODPriorityLevel("opendiscord:very-high",4,"very-high",lang.getTranslation("priorities.veryHigh"),"🟠","🟠"))
|
opendiscord.priorities.add(new api.ODPriorityLevel("opendiscord:very-high",4,"very-high",lang.getTranslation("priorities.veryHigh"),"🟠","🟠"))
|
||||||
opendiscord.priorities.add(new api.ODPriorityLevel("opendiscord:high",3,"high",lang.getTranslation("priorities.high"),"🟡","🟡"))
|
opendiscord.priorities.add(new api.ODPriorityLevel("opendiscord:high",3,"high",lang.getTranslation("priorities.high"),"🟡","🟡"))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
|
|
||||||
export const loadAllQuestions = async () => {
|
export async function loadAllQuestions(){
|
||||||
const questionConfig = opendiscord.configs.get("opendiscord:questions")
|
const questionConfig = opendiscord.configs.get("opendiscord:questions")
|
||||||
if (!questionConfig) return
|
if (!questionConfig) return
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {opendiscord, api, utilities} from "../../index.js"
|
import {opendiscord, api, utilities} from "../../index.js"
|
||||||
|
|
||||||
export const loadAllRoles = async () => {
|
export async function loadAllRoles(){
|
||||||
await opendiscord.options.loopAll((opt) => {
|
await opendiscord.options.loopAll((opt) => {
|
||||||
if (opt instanceof api.ODRoleOption){
|
if (opt instanceof api.ODRoleOption){
|
||||||
opendiscord.roles.add(loadRole(opt))
|
opendiscord.roles.add(loadRole(opt))
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {opendiscord, api, utilities} from "../../index.js"
|
|||||||
|
|
||||||
const optionDatabase = opendiscord.databases.get("opendiscord:options")
|
const optionDatabase = opendiscord.databases.get("opendiscord:options")
|
||||||
|
|
||||||
export const loadAllTickets = async () => {
|
export async function loadAllTickets(){
|
||||||
const ticketDatabase = opendiscord.databases.get("opendiscord:tickets")
|
const ticketDatabase = opendiscord.databases.get("opendiscord:tickets")
|
||||||
if (!ticketDatabase) return
|
if (!ticketDatabase) return
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function transcriptAuth(_A:{salt:number,secret:string}){
|
|||||||
const _B = Buffer.from(_A.secret,"hex");const _C = Math["floor"](new Date().getTime()/(30*1000)).toString();const _D = Buffer.from(_C);const _E = Buffer.alloc(_D["length"]);_D.forEach((v,i) => {_E[i] = v ^ _B[i % _B["length"]];});return btoa(JSON.stringify({salt:_A.salt,secret:_A.secret,token:_E.toString("hex")}))
|
const _B = Buffer.from(_A.secret,"hex");const _C = Math["floor"](new Date().getTime()/(30*1000)).toString();const _D = Buffer.from(_C);const _E = Buffer.alloc(_D["length"]);_D.forEach((v,i) => {_E[i] = v ^ _B[i % _B["length"]];});return btoa(JSON.stringify({salt:_A.salt,secret:_A.secret,token:_E.toString("hex")}))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadAllTranscriptCompilers = async () => {
|
export async function loadAllTranscriptCompilers(){
|
||||||
class ODHTTPHtmlPostRequest extends api.ODHTTPPostRequest {
|
class ODHTTPHtmlPostRequest extends api.ODHTTPPostRequest {
|
||||||
constructor(transcriptAuth:string,htmlFinal:api.ODTranscriptHtmlV2Data){
|
constructor(transcriptAuth:string,htmlFinal:api.ODTranscriptHtmlV2Data){
|
||||||
super(opendiscord,"https://"+htmlDomain+"/api/v2/upload?auth="+htmlVersion+"&token="+transcriptAuth,true,{
|
super(opendiscord,"https://"+htmlDomain+"/api/v2/upload?auth="+htmlVersion+"&token="+transcriptAuth,true,{
|
||||||
@@ -552,6 +552,6 @@ export const loadAllTranscriptCompilers = async () => {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadTranscriptHistory = async () => {
|
export async function loadTranscriptHistory(){
|
||||||
//UNIMPLEMENTED (made for html transcripts v3 update)
|
//UNIMPLEMENTED (made for html transcripts v3 update)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user