Skip to content

Commit

Permalink
Merge pull request #609 from Ikaros-521/owner
Browse files Browse the repository at this point in the history
用户仅发送点歌命令的情况下,优化命令错误的提示语
  • Loading branch information
Ikaros-521 committed Feb 1, 2024
2 parents 806ac33 + 4cebe6b commit 05f2788
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/投资人/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
{
name: "Kingsss",
avatar: "https://images.cnblogs.com/cnblogs_com/ikaros-521/2328032/o_231201155829_QQ%E5%9B%BE%E7%89%8720231201235446.jpg",
amount: "¥360"
amount: "¥390"
},
{
name: "月零宫白",
Expand Down
Binary file modified docs/投资人/invest.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions utils/my_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,22 @@ def choose_song_handle(self, data):

# 去除命令前缀
content = content[len(start_cmd):]

# 说明用户仅发送命令,没有发送歌名,说明用户不会用
if content == "":
message = {
"type": "comment",
"tts_type": My_handle.config.get("audio_synthesis_type"),
"data": My_handle.config.get(My_handle.config.get("audio_synthesis_type")),
"config": My_handle.config.get("filter"),
"user_name": user_name,
"content": f'点歌命令错误,命令为 {My_handle.config.get("choose_song", "start_cmd")}+歌名'
}

self.audio_synthesis_handle(message)

return True

# 判断是否有此歌曲
song_filename = My_handle.common.find_best_match(content, choose_song_song_lists, similarity=My_handle.config.get("choose_song", "similarity"))
if song_filename is None:
Expand Down

0 comments on commit 05f2788

Please sign in to comment.