Added types for subcommands
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { useMainPlayer } from "discord-player"
|
||||
import { ChatInputCommandInteraction, GuildMember } from "discord.js"
|
||||
import { GuildMember } from "discord.js"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { SubCommand } from "~/typings"
|
||||
|
||||
export default async function play(interaction: ChatInputCommandInteraction) {
|
||||
const cmd: SubCommand = async (interaction) => {
|
||||
await interaction.deferReply()
|
||||
const query = interaction.options.getString("query")!
|
||||
const channel = (interaction.member as GuildMember).voice.channel
|
||||
@@ -41,3 +42,5 @@ export default async function play(interaction: ChatInputCommandInteraction) {
|
||||
}]
|
||||
})
|
||||
}
|
||||
|
||||
export default cmd
|
||||
|
||||
Reference in New Issue
Block a user