Skip to content

Commit

Permalink
1.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
idranme committed Dec 16, 2024
1 parent 201530e commit 389833c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "koishi-plugin-music-voice",
"description": "Provide the selected song as a voice",
"version": "1.5.3",
"version": "1.5.4",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"files": [
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const Config: Schema<Config> = Schema.intersect([
menuExitCommandTip: Schema.boolean().description('是否在歌单内容的后面,加上退出选择指令的文字提示').default(false),
recall: Schema.boolean().description('是否在发送语音后撤回 generationTip').default(true),
maxDuration: Schema.natural().role('ms').min(Time.minute).step(Time.minute).description('歌曲最长持续时间,单位为毫秒')
.default(70 * Time.minute)
.default(30 * Time.minute)
}).description('进阶设置')
])

Expand Down Expand Up @@ -314,11 +314,11 @@ export function apply(ctx: Context, cfg: Config) {
if (cfg.recall) session.bot.deleteMessage(channelId, tipMessageId)
return `${h.quote(quoteId)}歌曲持续时间超出限制。`
}
const url = new URL(src)
/*const url = new URL(src)
if (url.host.startsWith('ws.stream')) {
url.host = url.host.replace('ws.stream', 'isure6.stream')
}
await session.send(h.audio(url.href, { duration }))
}*/
await session.send(h.audio(src, { duration }))
} catch (err) {
if (cfg.recall) session.bot.deleteMessage(channelId, tipMessageId)
throw err
Expand Down

0 comments on commit 389833c

Please sign in to comment.