diff --git a/commands/CardCommand.py b/commands/CardCommand.py index 7d21bed..6ecce0a 100644 --- a/commands/CardCommand.py +++ b/commands/CardCommand.py @@ -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: diff --git a/i18n/message.en.yml b/i18n/message.en.yml index ed3da85..c8a7add 100644 --- a/i18n/message.en.yml +++ b/i18n/message.en.yml @@ -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" diff --git a/i18n/message.jp.yml b/i18n/message.jp.yml index b542649..e83def5 100644 --- a/i18n/message.jp.yml +++ b/i18n/message.jp.yml @@ -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: "生成"