Skip to content

Commit

Permalink
FIx bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cytsai1008 committed May 21, 2024
1 parent 31a5921 commit 3c92bc6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/dv_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ async def set_noname(ctx, value: str):
if value in {"on", "off"}:
db["no_name"] = True if value == "on" else False
tool_function.write_db_json(f"{ctx.guild.id}", db)
if value:
if db["no_name"]:
reply_msg = tool_function.convert_msg(
LOCALE,
tool_function.check_db_lang(ctx),
Expand All @@ -1258,7 +1258,7 @@ async def set_noname(ctx, value: str):
"no_name_on",
None,
)
elif not value:
elif not db["no_name"]:
reply_msg = tool_function.convert_msg(
LOCALE,
tool_function.check_db_lang(ctx),
Expand Down Expand Up @@ -1441,7 +1441,10 @@ async def say_lang(ctx, lang: str, *, content: str, gpt: bool = False): # sourc
is_connected
and channelissetup
and lang_code_is_right
and (channel_id == db["channel"] or (tool_function.check_dict_data(db, "nochannel") and db["nochannel"]))
and (
channel_id == db["channel"]
or (tool_function.check_dict_data(db, "nochannel") and db["nochannel"] == "on")
)
):
# export content to mp3 by google tts api
# get username
Expand Down

0 comments on commit 3c92bc6

Please sign in to comment.