Skip to content

Commit

Permalink
Merge pull request #32 from lenlino/dev
Browse files Browse the repository at this point in the history
キャラクター未設定時
  • Loading branch information
lenlino authored Nov 15, 2023
2 parents ece1324 + 5d6daa4 commit 73fad2f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion commands/CardCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ async def set_uid(changed_uid):
selecter.append_option(
discord.SelectOption(label=i["name"], value=str(index),
default=True if index == select_number else False))
await ctx.edit(view=get_view())
if len(selecter.options) == 0:
embed.description += "\n"+i18n.t("message.error_no_chara_set", locale=lang)
else:
await ctx.edit(view=get_view())
elif info["detail"] == "Queue timeout":
embed.description = i18n.t("message.error_queue_timeout", locale=lang)
else:
Expand Down
1 change: 1 addition & 0 deletions i18n/message.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ en:
error_uid_not_set: "UID not set"
error_queue_timeout: "API server is down. Please wait until recovery. (Queue timeout)"
error_not_exist_uid: "UID is not specified or does not exist."
error_no_chara_set: "Character not set"
change_uid: "Change UID"
nickname: "Nickname: "
generate: "Generate"
Expand Down
1 change: 1 addition & 0 deletions i18n/message.jp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jp:
error_uid_not_set: "UIDが設定されていません。"
error_queue_timeout: "APIサーバーがダウンしています。復旧までお待ちください。 (Queue timeout)"
error_not_exist_uid: "未設定もしくは存在しないUIDです。"
error_no_chara_set: "キャラクターがセットされていません。"
change_uid: "UID変更"
nickname: "ニックネーム: "
generate: "生成"
Expand Down

0 comments on commit 73fad2f

Please sign in to comment.