Added dprint and formatted file to it
Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
@@ -8,7 +8,7 @@ async function deleteCommands() {
|
||||
console.log("Started deleting application (/) commands.")
|
||||
await rest.put(
|
||||
Routes.applicationGuildCommands(env.dev.devid, env.dev.guildid),
|
||||
{ body: [] },
|
||||
{ body: [] }
|
||||
)
|
||||
console.log("Successfully deleted application (/) commands.")
|
||||
} catch (error) {
|
||||
|
||||
@@ -18,7 +18,7 @@ for (const file of contentMenuCommands) {
|
||||
commands.push(command.data.toJSON())
|
||||
}
|
||||
|
||||
(async () => {
|
||||
;(async () => {
|
||||
try {
|
||||
console.log(color(`Started refreshing ${commands.length} application (/) commands.`, "green"))
|
||||
|
||||
@@ -27,12 +27,11 @@ for (const file of contentMenuCommands) {
|
||||
|
||||
await rest.put(
|
||||
Routes.applicationCommands(env.dev.clientid),
|
||||
{ body: commands },
|
||||
{ body: commands }
|
||||
).then(() => {
|
||||
console.log(color(`Successfully reloaded ${commands.length} application (/) commands.`, "green"))
|
||||
process.exit(0)
|
||||
})
|
||||
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js"
|
||||
import fs from "fs"
|
||||
import env from "../src/utils/Env"
|
||||
import { ICommand } from "../src/interfaces"
|
||||
import env from "../src/utils/Env"
|
||||
const rest = new REST({ version: "10" }).setToken(env.dev.devtoken)
|
||||
|
||||
const commands: RESTPutAPIApplicationCommandsJSONBody = []
|
||||
@@ -21,13 +21,13 @@ for (const file of contentMenuCommands) {
|
||||
}
|
||||
}
|
||||
|
||||
(async () => {
|
||||
;(async () => {
|
||||
try {
|
||||
console.log(`Started refreshing ${commands.length} application (/) commands.`)
|
||||
|
||||
await rest.put(
|
||||
Routes.applicationGuildCommands(env.dev.devid, env.dev.guildid),
|
||||
{ body: commands },
|
||||
{ body: commands }
|
||||
).then(() => {
|
||||
console.log(`Successfully reloaded ${commands.length} application (/) commands.`)
|
||||
process.exit(0)
|
||||
|
||||
Reference in New Issue
Block a user