Skip to content

Commit 05f2788

Browse files
authored
Merge pull request #609 from Ikaros-521/owner
用户仅发送点歌命令的情况下,优化命令错误的提示语
2 parents 806ac33 + 4cebe6b commit 05f2788

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

docs/投资人/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
{
7575
name: "Kingsss",
7676
avatar: "https://images.cnblogs.com/cnblogs_com/ikaros-521/2328032/o_231201155829_QQ%E5%9B%BE%E7%89%8720231201235446.jpg",
77-
amount: "¥360"
77+
amount: "¥390"
7878
},
7979
{
8080
name: "月零宫白",

docs/投资人/invest.png

-7.09 KB
Loading

utils/my_handle.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,22 @@ def choose_song_handle(self, data):
722722

723723
# 去除命令前缀
724724
content = content[len(start_cmd):]
725+
726+
# 说明用户仅发送命令,没有发送歌名,说明用户不会用
727+
if content == "":
728+
message = {
729+
"type": "comment",
730+
"tts_type": My_handle.config.get("audio_synthesis_type"),
731+
"data": My_handle.config.get(My_handle.config.get("audio_synthesis_type")),
732+
"config": My_handle.config.get("filter"),
733+
"user_name": user_name,
734+
"content": f'点歌命令错误,命令为 {My_handle.config.get("choose_song", "start_cmd")}+歌名'
735+
}
736+
737+
self.audio_synthesis_handle(message)
738+
739+
return True
740+
725741
# 判断是否有此歌曲
726742
song_filename = My_handle.common.find_best_match(content, choose_song_song_lists, similarity=My_handle.config.get("choose_song", "similarity"))
727743
if song_filename is None:

0 commit comments

Comments
 (0)