Skip to content

Commit e0ddbd3

Browse files
committed
style: rename slashToJSON in commandToJSON
1 parent f4d1723 commit e0ddbd3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/discord.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import consola from 'consola'
33
import type { Harmonix } from './types'
44
import 'dotenv/config'
55
import { createError, ctx } from './harmonix'
6-
import { contextMenuToJSON, isHarmonixCommand, slashToJSON } from './utils'
6+
import { contextMenuToJSON, isHarmonixCommand, commandToJSON } from './utils'
77

88
export const initCient = (harmonixOptions: Harmonix['options']) => {
99
try {
@@ -31,7 +31,7 @@ export const refreshApplicationCommands = async (harmonix: Harmonix) => {
3131
Routes.applicationCommands(harmonix.options.clientId || client.user.id),
3232
{
3333
body: commands.map((cmd) =>
34-
isHarmonixCommand(cmd) ? slashToJSON(cmd) : contextMenuToJSON(cmd)
34+
isHarmonixCommand(cmd) ? commandToJSON(cmd) : contextMenuToJSON(cmd)
3535
)
3636
}
3737
)

src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type {
1313
ParsedOptionType
1414
} from './types'
1515

16-
export const slashToJSON = (cmd: HarmonixCommand<OptionsDef>) => {
16+
export const commandToJSON = (cmd: HarmonixCommand<OptionsDef>) => {
1717
const builder = new SlashCommandBuilder()
1818
.setName(cmd.config.name!)
1919
.setDescription(cmd.config.description || 'No description provided')

0 commit comments

Comments
 (0)