Updated interfacecs
This commit is contained in:
@@ -27,8 +27,7 @@ export default function loadAutocompleteEvents(client: Client, ft: FileType) {
|
||||
|
||||
if (
|
||||
"name" in autocomplete &&
|
||||
"execute" in autocomplete &&
|
||||
autocomplete.type === "autocomplete"
|
||||
"execute" in autocomplete
|
||||
) {
|
||||
client.autocomplete.set(autocomplete.name, autocomplete)
|
||||
} else {
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function loadButtonEvents(client: Client, ft: FileType) {
|
||||
const filePath = path.join(btnPath, file)
|
||||
const btn: Button = require(filePath)
|
||||
|
||||
if ("name" in btn && "execute" in btn && btn.type === "button") {
|
||||
if ("name" in btn && "execute" in btn) {
|
||||
client.buttons.set(btn.name, btn)
|
||||
} else {
|
||||
console.log(
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function loadSlashCommandsEvents(client: Client, ft: FileType) {
|
||||
const filePath = path.join(cmdPath, file)
|
||||
const cmd: Command = require(filePath)
|
||||
|
||||
if ("data" in cmd && "execute" in cmd && cmd.type === "slash") {
|
||||
if ("data" in cmd && "execute" in cmd) {
|
||||
client.commands.set(cmd.data.name, cmd)
|
||||
} else {
|
||||
console.log(
|
||||
|
||||
@@ -24,7 +24,7 @@ export default function loadContextMenuEvents(client: Client, ft: FileType) {
|
||||
const filePath = path.join(contextMenuPath, file)
|
||||
const cmd: ContextMenu = require(filePath)
|
||||
|
||||
if ("data" in cmd && "execute" in cmd && cmd.type === "contextmenu") {
|
||||
if ("data" in cmd && "execute" in cmd) {
|
||||
client.contextmenus.set(cmd.data.name, cmd)
|
||||
} else {
|
||||
console.log(
|
||||
|
||||
@@ -19,7 +19,7 @@ export default function loadModalEvents(client: Client, ft: FileType) {
|
||||
const filePath = path.join(modalPath, file)
|
||||
const modal: Modal = require(filePath)
|
||||
|
||||
if ("name" in modal && "execute" in modal && modal.type === "modal") {
|
||||
if ("name" in modal && "execute" in modal) {
|
||||
client.modals.set(modal.name, modal)
|
||||
} else {
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user