Skip to content

Commit

Permalink
バグ修正
Browse files Browse the repository at this point in the history
  • Loading branch information
googlefan256 committed Mar 21, 2022
1 parent 6209fce commit c94df25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions commands/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const raw = {
name: "number",
required: true,
type: "INTEGER",
minValue: 1
minValue: 1,
description: ".."
}
]
}
Expand All @@ -20,7 +21,7 @@ export const exec = async function(i){
const player = i.client.players.get(i.guildId)
if(!player)return i.reply({embeds:[new Embed().setAuthor({name: "エラー", iconURL: "attachment://error.png"}).setDescription("このサーバーでこのbotは音楽を再生していません")],files:[new MessageAttachment("./assets/error.png","error.png")]})
if(!i.member.voice?.channel)return i.reply({embeds:[new Embed().setAuthor({name: "エラー", iconURL: "attachment://error.png"}).setDescription("ボイスチャンネルに参加してください!")],files:[new MessageAttachment("./assets/error.png","error.png")]})
const n = i.options.getIntger("number")
const n = i.options.getInteger("number")
const select = player.tracks[n - 1]
if(!select)return i.reply({embeds:[new Embed().setAuthor({name: "エラー", iconURL: "attachment://error.png"}).setDescription("その番号のトラックが見つかりませんでした!")],files:[new MessageAttachment("./assets/error.png","error.png")]})
player.tracks = player.tracks.filter((x, i) => i !== n - 1)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yt-bot",
"version": "2.1.0",
"version": "2.1.1",
"description": "",
"main": "index.mjs",
"type": "module",
Expand Down

0 comments on commit c94df25

Please sign in to comment.