Merge branch 'dev' into 'main'
Dev See merge request illegitimate/illegitimate-bot!226
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js"
|
import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js"
|
||||||
import fs from "node:fs"
|
import fs from "node:fs"
|
||||||
import { Command } from "../src/interfaces"
|
import { ICommand } from "../src/interfaces"
|
||||||
import env from "../src/utils/Env"
|
import env from "../src/utils/Env"
|
||||||
const rest = new REST({ version: "10" }).setToken(env.prod.token!)
|
const rest = new REST({ version: "10" }).setToken(env.prod.token!)
|
||||||
|
|
||||||
@@ -9,11 +9,11 @@ const commandFiles = fs.readdirSync("./src/commands").filter(file => file.endsWi
|
|||||||
const contentMenuCommands = fs.readdirSync("./src/commands-contextmenu").filter(file => file.endsWith(".ts"))
|
const contentMenuCommands = fs.readdirSync("./src/commands-contextmenu").filter(file => file.endsWith(".ts"))
|
||||||
|
|
||||||
for (const file of commandFiles) {
|
for (const file of commandFiles) {
|
||||||
const command: Command = require(`../src/commands/${file}`)
|
const command: ICommand = require(`../src/commands/${file}`)
|
||||||
commands.push(command.data.toJSON())
|
commands.push(command.data.toJSON())
|
||||||
}
|
}
|
||||||
for (const file of contentMenuCommands) {
|
for (const file of contentMenuCommands) {
|
||||||
const command: Command = require(`../src/commands-contextmenu/${file}`)
|
const command: ICommand = require(`../src/commands-contextmenu/${file}`)
|
||||||
commands.push(command.data.toJSON())
|
commands.push(command.data.toJSON())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js"
|
import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js"
|
||||||
import fs from "fs"
|
import fs from "fs"
|
||||||
import env from "../src/utils/Env"
|
import env from "../src/utils/Env"
|
||||||
import { Command } from "../src/interfaces"
|
import { ICommand } from "../src/interfaces"
|
||||||
const rest = new REST({ version: "10" }).setToken(env.dev.devtoken!)
|
const rest = new REST({ version: "10" }).setToken(env.dev.devtoken!)
|
||||||
|
|
||||||
const commands: RESTPutAPIApplicationCommandsJSONBody = []
|
const commands: RESTPutAPIApplicationCommandsJSONBody = []
|
||||||
@@ -9,13 +9,13 @@ const commandFiles = fs.readdirSync("./src/commands/").filter(file => file.endsW
|
|||||||
const contentMenuCommands = fs.readdirSync("./src/commands-contextmenu/").filter(file => file.endsWith(".ts"))
|
const contentMenuCommands = fs.readdirSync("./src/commands-contextmenu/").filter(file => file.endsWith(".ts"))
|
||||||
|
|
||||||
for (const file of commandFiles) {
|
for (const file of commandFiles) {
|
||||||
const command: Command = require(`../src/commands/${file}`)
|
const command: ICommand = require(`../src/commands/${file}`)
|
||||||
if (command.dev) {
|
if (command.dev) {
|
||||||
commands.push(command.data.toJSON())
|
commands.push(command.data.toJSON())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const file of contentMenuCommands) {
|
for (const file of contentMenuCommands) {
|
||||||
const command: Command = require(`../src/commands-contextmenu/${file}`)
|
const command: ICommand = require(`../src/commands-contextmenu/${file}`)
|
||||||
if (command.dev) {
|
if (command.dev) {
|
||||||
commands.push(command.data.toJSON())
|
commands.push(command.data.toJSON())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user