Skip to content

Commit

Permalink
refactor: biome error
Browse files Browse the repository at this point in the history
  • Loading branch information
ebina4yaka committed May 15, 2024
1 parent b0802d8 commit c68f59a
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/commands/play_album_apple_music.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SlashCommandBuilder } from '@discordjs/builders'
import { QueryType } from 'discord-player'
import { addTracks } from '../player.js'

export default {
export const command = {
data: new SlashCommandBuilder()
.setName('play_album_apple_music')
.setDescription('アルバムを再生します')
Expand Down
2 changes: 1 addition & 1 deletion src/commands/play_playlist_apple_music.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SlashCommandBuilder } from '@discordjs/builders'
import { QueryType } from 'discord-player'
import { addTracks } from '../player.js'

export default {
export const command = {
data: new SlashCommandBuilder()
.setName('play_playlist_apple_music')
.setDescription('プレイリストを再生します')
Expand Down
2 changes: 1 addition & 1 deletion src/commands/play_playlist_spotify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SlashCommandBuilder } from '@discordjs/builders'
import { QueryType } from 'discord-player'
import { addTracks } from '../player.js'

export default {
export const command = {
data: new SlashCommandBuilder()
.setName('play_playlist_spotify')
.setDescription('プレイリストを再生します')
Expand Down
2 changes: 1 addition & 1 deletion src/commands/play_song_apple_music.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SlashCommandBuilder } from '@discordjs/builders'
import { QueryType } from 'discord-player'
import { addTracks } from '../player.js'

export default {
export const command = {
data: new SlashCommandBuilder()
.setName('play_song_apple_music')
.setDescription('音楽を再生します')
Expand Down
2 changes: 1 addition & 1 deletion src/commands/play_song_spotify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SlashCommandBuilder } from '@discordjs/builders'
import { QueryType } from 'discord-player'
import { addTracks } from '../player.js'

export default {
export const command = {
data: new SlashCommandBuilder()
.setName('play_song_spotify')
.setDescription('音楽を再生します')
Expand Down
2 changes: 1 addition & 1 deletion src/commands/stop_music.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SlashCommandBuilder } from '@discordjs/builders'
import winston from 'winston'

export default {
export const command = {
data: new SlashCommandBuilder()
.setName('stop_music')
.setDescription('再生を停止してbotを終了します'),
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ client.slashcommands = {}
client.player = new Player(client)

for (const file of commandFiles) {
const command = await import(`./commands/${file}`)
client.slashcommands[command.default.data.name] = command.default
const { command } = await import(`./commands/${file}`)
client.slashcommands[command.data.name] = command
}

client.on('ready', async () => {
Expand Down
4 changes: 2 additions & 2 deletions src/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Routes } from 'discord-api-types/v9'
import { commandFiles } from './files.js'

const commands = commandFiles.map(async (file) => {
const command = await import(`./commands/${file}`)
return command.default.data.toJSON()
const { command } = await import(`./commands/${file}`)
return command.data.toJSON()
})

const rest = new REST({ version: '9' }).setToken(process.env.TOKEN)
Expand Down

0 comments on commit c68f59a

Please sign in to comment.