Code Cleanup & Improved channel rename errors

This commit is contained in:
DJj123dj
2026-05-15 22:30:24 +02:00
parent ca5faa3365
commit afd7f80b8d
49 changed files with 348 additions and 523 deletions
+6 -7
View File
@@ -1,9 +1,8 @@
///////////////////////////////////////
//TICKET COMMAND
///////////////////////////////////////
import {opendiscord, api, utilities} from "../index.js"
import {opendiscord, api, utilities, openticketUtils} from "../index.js"
import * as discord from "discord.js"
import * as actionUtils from "../actions/utilities.js"
const generalConfig = opendiscord.configs.get("opendiscord:general")
const lang = opendiscord.languages
@@ -34,10 +33,10 @@ export async function registerCommandResponders(){
const {user,member,channel,guild} = instance
//responder checks
const hasPerms = await actionUtils.replyHasPermissions(instance,origin,"ticket")
const hasPerms = await openticketUtils.replyHasPermissions(instance,origin,"ticket")
if (!hasPerms) return cancel()
const isInGuild = await actionUtils.replyIsInGuild(instance,origin)
const isInGuild = await openticketUtils.replyIsInGuild(instance,origin)
if (!isInGuild || !guild || channel.isDMBased()) return cancel()
//get option data
@@ -86,7 +85,7 @@ export async function registerButtonResponders(){
const {guild,channel,user} = instance
//responder checks
const isInGuild = await actionUtils.replyIsInGuild(instance,origin)
const isInGuild = await openticketUtils.replyIsInGuild(instance,origin)
if (!isInGuild || !guild || channel.isDMBased()) return cancel()
//get option data
@@ -128,7 +127,7 @@ export async function registerDropdownResponders(){
const {guild,channel,user} = instance
//responder checks
const isInGuild = await actionUtils.replyIsInGuild(instance,origin)
const isInGuild = await openticketUtils.replyIsInGuild(instance,origin)
if (!isInGuild || !guild || channel.isDMBased()) return cancel()
//get option data
@@ -178,7 +177,7 @@ export async function registerModalResponders(){
const {guild,channel,user} = instance
//responder checks
const isInGuild = await actionUtils.replyIsInGuild(instance,origin)
const isInGuild = await openticketUtils.replyIsInGuild(instance,origin)
if (!isInGuild || !guild || !channel || channel.isDMBased()) return cancel()
//get option data