Giter Club home page Giter Club logo

shenhe_bot's Introduction

THIS PROJECT IS DISCONTINUED 此項目已停更

Raiden Shogun artwork by Asaki
Logo desinged by Ayaakaa

English | 中文

Shenhe was orignially a Discord bot for Genshin Impact. However, as the project evolved, it is now a Discord bot for all Hoyoverse games.

Discord shield for Shenhe support server

Why Shenhe?

  • Multiple account support: Shenhe makes it easy to manage multiple accounts across different Hoyoverse games, allowing you to switch between accounts seamlessly.
  • Localization: Shenhe is available in multiple languages, including English, Chinese, Indonesian, and Japanese, ensuring that users from different regions can use the bot with ease.
  • Image generation: Shenhe's image generation feature allows you to showcase your characters in a beautiful and fashionable way, making it easy to show off your characters to other players.
  • Damage calculator: Shenhe's unique damage calculator feature makes it easy to calculate the damage potential of your characters in Genshin Impact, giving you an edge in battles.
  • Notifications: Don't want to waste a single resin/trailblaze power at all? Setup a reminder! There are also expedition, realm currency, parametric transformer reminders. For Genshin Impact, you can also setup reminders to farm materials for specific characters or weapons.
  • Active development: Shenhe is constantly being updated with new features and improvements, ensuring that users have access to the latest tools and functionalities.
  • Customer support: Shenhe's developer is actively engaged with the community and provides excellent customer support, responding to user feedback and helping users resolve any issues they may encounter.
  • Easy to use: Shenhe is designed to be user-friendly and intuitive, with a simple and clean interface that makes it easy to navigate and use.
  • Customizable: Dark or light mode, pick your preference! Don't like artwork in the card? Choose your own one. Don't want notifications? Turn them off as you like.
  • Free: Shenhe is completely free to use, making it accessible to all Hoyoverse players who want to optimize their gameplay.

Invite Shenhe

Interested? Click on this link to try out Shenhe!

Third-party repos and libraries used in this project:

Support Me

I developed Shenhe by myself (with 3rd party libraries and helps from other developers) in my free-time.
Supporting is never an obligation but is always appreciated and motivates me to invest more time in the project and to keep this project alive.
If you like my work, you can sponsor me on Ko-Fi.

shenhe_bot's People

Contributors

amazingakai avatar ayaasaku avatar deepsource-autofix[bot] avatar deepsource-io[bot] avatar dependabot[bot] avatar momu54 avatar mrwan200 avatar seriaati avatar tedd157 avatar xiaokuai0915 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

shenhe_bot's Issues

leaderboard bug

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_bot\cogs\genshin.py", line 1104, in leaderboard
    message += f'{rank}. {(i.guild.get_member(tuple[0])).display_name} - {round(tuple[1], 2)}%\n'
AttributeError: 'NoneType' object has no attribute 'display_name'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 668, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'leaderboard排行榜' raised an exception: AttributeError: 'NoneType' object has no attribute 'display_name'

abyss interaction already responded

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_bot\cogs\genshin.py", line 194, in abyss
    await i.response.send_message(embed=result)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\interactions.py", line 671, in send_message
    raise InteractionResponded(self._parent)
discord.errors.InteractionResponded: This interaction has already been responded to before

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 668, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'abyss深淵' raised an exception: InteractionResponded: This interaction has already been responded to before```

/help 重寫

bot.get_cog('GenshinCog').__cog_app_commands__ 可以拿到 GenshinCog 裡所有的 app_commands objects

commands = bot.get_cog('GenshinCog').__cog_app_commands__
for command in commands:
  print(command.name)
  print(command.description)

[錯誤回報]

哪個指令出錯了?

/profile角色展示

如果可行的話,請告訴我重現該錯誤的步驟

角色(夜蘭)展示後,計算傷害時出現錯誤

請貼上「除錯用訊息」

Traceback (most recent call last):
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\view.py", line 414, in _scheduled_task
await item.callback(interaction)
File "C:\Users\alice\shenhe_public\cogs\genshin.py", line 724, in callback
embed = await calculateDamage(self.view.eng_data, self.view.browser, self.view.character_id, 'critHit', i.user)
File "C:\Users\alice\shenhe_public\utility\utils.py", line 138, in calculateDamage
card_index = label_vals.index(t)
ValueError: 'Normal Atk.' is not in list

如果方便的話,請留下你的 dc tag

櫻花冰棒#1190

[錯誤回報]

哪個指令出錯了?

/register註冊 選項: 提交 cookie

如果可行的話,請告訴我重現該錯誤的步驟

提交cookie

請貼上「除錯用訊息」

Traceback (most recent call last):
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\modal.py", line 187, in _scheduled_task
await self.on_submit(interaction)
File "C:\Users\alice\shenhe_public\cogs\genshin.py", line 59, in on_submit
result, success = await self.genshin_app.setCookie(i.user.id, self.cookie.value)
File "C:\Users\alice\shenhe_public\utility\apps\GenshinApp.py", line 44, in setCookie
await c.execute('INSERT INTO genshin_accounts (user_id, ltuid, ltoken, cookie_token, uid) VALUES (?, ?, ?, ?, ?) ON CONFLICT (user_id) DO UPDATE SET ltuid = ?, ltoken = ?, cookie_token = ?, uid = ? WHERE user_id = ?', (user_id, cookie[0], cookie[1], cookie[2], uid, cookie[0], cookie[1], cookie[2], uid, user_id))
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\cursor.py", line 37, in execute
await self._execute(self._cursor.execute, sql, parameters)
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\cursor.py", line 31, in _execute
return await self._conn._execute(fn, *args, **kwargs)
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 129, in _execute
return await future
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\aiosqlite\core.py", line 102, in run
result = function()
sqlite3.IntegrityError: NOT NULL constraint failed: genshin_accounts.talent_notif_chara_list

如果方便的話,請留下你的 dc tag

櫻花冰棒#1190

[錯誤回報]

哪個指令出錯了?

/register

如果可行的話,請告訴我重現該錯誤的步驟

提交cookie之後一定出現

請貼上「除錯用訊息」

Traceback (most recent call last):
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\modal.py", line 187, in _scheduled_task
await self.on_submit(interaction)
File "C:\Users\alice\shenhe_public\cogs\genshin.py", line 59, in on_submit
result, success = await self.genshin_app.setCookie(i.user.id, self.cookie.value, i.locale)
File "C:\Users\alice\shenhe_public\utility\apps\GenshinApp.py", line 31, in setCookie
client.lang = user_locale or locale
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\genshin\client\components\base.py", line 96, in lang
raise ValueError(f"{lang} is not a valid language, must be one of: " + ", ".join(constants.LANGS))
ValueError: zh-TW is not a valid language, must be one of: zh-cn, zh-tw, de-de, en-us, es-es, fr-fr, id-id, ja-jp, ko-kr, pt-pt, ru-ru, th-th, vi-vn

如果方便的話,請留下你的 dc tag

北極狐#9914

[功能請求] change text map keys to str

請描述你的想法

this happens when the key is not a str:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\view.py", line 414, in _scheduled_task
    await item.callback(interaction)
  File "C:\Users\alice\shenhe_public\UI_elements\genshin\Build.py", line 38, in callback
    await element_button_callback(i, self.element, self.view)
  File "C:\Users\alice\shenhe_public\UI_elements\genshin\Build.py", line 105, in element_button_callback
    character_id = text_map.get_character_id_with_name(
  File "C:\Users\alice\shenhe_public\apps\text_map\text_map_app.py", line 87, in get_character_id_with_name
    return int(character_id)
ValueError: invalid literal for int() with base 10: '10000005-anemo'

新增 !tag 指令

  • !tag <tag_name>
  • !tag search
  • !tag create <tag_name>
  • !tag remove <tag_name>

例: !tag 宵宮胡桃哪個強
申鶴 return: 胡桃比較平

replying to message 的時候申鶴的 return 也會 reply to that message

/wish character 找不到 up_guarantee 的值

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_bot\cogs\wish.py", line 301, in wish_char
    get_num, use_pull, left_pull, up_guarantee = await self.char_banner_calc(i.user.id)
  File "C:\Users\alice\shenhe_bot\cogs\wish.py", line 180, in char_banner_calc
    return get_num, use_pull, left_pull, up_guarantee
UnboundLocalError: local variable 'up_guarantee' referenced before assignment

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 668, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'character角色預測' raised an exception: UnboundLocalError: local variable 'up_guarantee' referenced before assignment

[錯誤回報] 無法返回元素選擇

哪個指令出錯了?

/build

如果可行的話,請告訴我重現該錯誤的步驟

請貼上「除錯用訊息」

如果方便的話,請留下你的 dc tag

/events 活動敘述超過1024個字的時候無法正常運作

早知道之前就不要偷懶了

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_bot\cogs\genshin.py", line 1380, in events
    await GeneralPaginator(i, embeds).start(embeded=True)
  File "C:\Users\alice\shenhe_bot\utility\paginators\GeneralPaginator.py", line 95, in start
    await self.interaction.response.send_message(**kwargs)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\interactions.py", line 697, in send_message
    await adapter.create_interaction_response(
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\webhook\async_.py", line 215, in request
    raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In data.embeds.0.fields.0.value: Must be 1024 or fewer in length.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 668, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'events活動' raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In data.embeds.0.fields.0.value: Must be 1024 or fewer in length. 

[功能請求]

請描述你的想法

把右鍵快捷指令也加到訊息右鍵裡面

:ayaka_heh:

/calc character 錯誤

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_bot\cogs\genshin.py", line 783, in calc_character
    client, uid, only_uid = await self.genshin_app.getUserCookie(i.user.id)
ValueError: too many values to unpack (expected 3)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 668, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'character擁有角色' raised an exception: ValueError: too many values to unpack (expected 3)

[功能請求] crash proof for /profile

請描述你的想法

this error raises when the UID is invalid:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_public\cogs\genshin.py", line 351, in profile
    await self.profile_command(i, member, custom_uid, False)
  File "C:\Users\alice\shenhe_public\cogs\genshin.py", line 378, in profile_command
    data: EnkaNetworkResponse = await self.bot.enka_client.fetch_user(uid)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\enkanetwork\client.py", line 44, in fetch_user
    raise VaildateUIDError("Validate UID failed. Please check your UID.")
enkanetwork.exception.VaildateUIDError: Validate UID failed. Please check your UID.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 668, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'profile角色展示' raised an exception: VaildateUIDError: Validate UID failed. Please check your UID.

add a try-except to catch this error

[錯誤回報] interaction_check

哪個指令出錯了?

/build
然後 paginator 的部份 (interaction_check) 要本地化

請貼上「除錯用訊息」

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\view.py", line 419, in _scheduled_task
    allow = await self.interaction_check(interaction)
  File "C:\Users\alice\shenhe_public\UI_elements\genshin\Build.py", line 28, in interaction_check
    await i.response.send_message(embed=error_embed().set_author(name=text_map.get(143, self.locale, self.user_locale), icon_url=i.user.avatar))
AttributeError: 'View' object has no attribute 'locale'

[錯誤回報]

哪個指令出錯了?

/check

如果可行的話,請告訴我重現該錯誤的步驟

質變儀可使用時仍顯示剩餘時間

請貼上「除錯用訊息」

如果方便的話,請留下你的 dc tag

[錯誤回報] 角色配置 風屬性

角色配置 風屬性

角色配置 風屬性

Traceback (most recent call last):
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\view.py", line 414, in _scheduled_task
await item.callback(interaction)
File "C:\Users\alice\shenhe_public\UI_elements\genshin\Build.py", line 38, in callback
await element_button_callback(i, self.element, self.view)
File "C:\Users\alice\shenhe_public\UI_elements\genshin\Build.py", line 105, in element_button_callback
character_id = text_map.get_character_id_with_name(
File "C:\Users\alice\shenhe_public\apps\text_map\text_map_app.py", line 87, in get_character_id_with_name
return int(character_id)
ValueError: invalid literal for int() with base 10: '10000005-anemo'

Lele.#2247

[錯誤回報] 沒辦法找圖

哪個指令出錯了?

/waifu waifu

如果可行的話,請告訴我重現該錯誤的步驟

在私訊中使用/waifu waifu 選擇多情模式

請貼上「除錯用訊息」

image

如果方便的話,請留下你的 dc tag

某幕#1501

讓祈願紀錄能儲存半年以上的紀錄

目前 /wish setkey 是刪除之前所有紀錄再放進米哈遊那邊存的祈願紀錄,但米哈遊只願意存半年以內
目標是能在申鶴的資料庫這邊保留先前的紀錄,再額外加上新的
如果米哈遊有提供 pull 的秒數,就可以用 SQLite 的 UPSERT 配上 UNIQUE pair 來達成

[錯誤回報] 排行榜好像有點問題

哪個指令出錯了?

/leaderboard

如果可行的話,請告訴我重現該錯誤的步驟

請貼上「除錯用訊息」

如果方便的話,請留下你的 dc tag

[功能請求] 更好的 /events

/2d 系列指令 圖片url 可能為 None 的問題

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_bot\cogs\waifu.py", line 218, in gif
    async with self.bot.session.get(str(url)) as resp:
  File "C:\Users\alice\AppData\Roaming\Python\Python310\site-packages\aiohttp\client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "C:\Users\alice\AppData\Roaming\Python\Python310\site-packages\aiohttp\client.py", line 507, in _request
    req = self._request_class(
  File "C:\Users\alice\AppData\Roaming\Python\Python310\site-packages\aiohttp\client_reqrep.py", line 305, in __init__
    self.update_host(url)
  File "C:\Users\alice\AppData\Roaming\Python\Python310\site-packages\aiohttp\client_reqrep.py", line 366, in update_host
    raise InvalidURL(url)
aiohttp.client_exceptions.InvalidURL: None

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 668, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'nsfw' raised an exception: InvalidURL: None

[錯誤回報] enka /profile locale 問題

哪個指令出錯了?

/profile

如果可行的話,請告訴我重現該錯誤的步驟

uid 901971416

請貼上「除錯用訊息」

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_public\cogs\genshin.py", line 351, in profile
    await self.profile_command(i, member, custom_uid, False)
  File "C:\Users\alice\shenhe_public\cogs\genshin.py", line 376, in profile_command
    await self.bot.enka_client.set_language(enka_locale)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\enkanetwork\client.py", line 39, in set_language
    self.lang = lang
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\enkanetwork\client.py", line 36, in lang
    self.assets._set_language(lang)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\enkanetwork\assets.py", line 130, in _set_language
    if not lang.split("-")[0].lower() in list(Language):
AttributeError: 'NoneType' object has no attribute 'split'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 668, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'profile角色展示' raised an exception: AttributeError: 'NoneType' object has no attribute 'split'

如果方便的話,請留下你的 dc tag

[錯誤回報] damage calculator went wrong

哪個指令出錯了?

/profile

如果可行的話,請告訴我重現該錯誤的步驟

UID: 902922264
character: raiden

請貼上「除錯用訊息」

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\view.py", line 414, in _scheduled_task
    await item.callback(interaction)
  File "C:\Users\alice\shenhe_public\UI_elements\genshin\EnkaProfile.py", line 67, in callback
    await return_damage(i, view)
  File "C:\Users\alice\shenhe_public\apps\genshin\damage_calculator.py", line 292, in return_damage
    embed = await calculator.run()
  File "C:\Users\alice\shenhe_public\apps\genshin\damage_calculator.py", line 40, in run
    damage_dict, description, effect = await self.calculate_damage()
  File "C:\Users\alice\shenhe_public\apps\genshin\damage_calculator.py", line 66, in calculate_damage
    await page.waitForSelector('div.MuiPaper-root.MuiPaper-elevation.MuiPaper-rounded.MuiPaper-elevation0.MuiCard-root.css-bch5q4 > div.MuiCardContent-root.css-10j5qql:nth-child(3) > div.MuiPaper-root.MuiPaper-elevation.MuiPaper-rounded.MuiPaper-elevation0.MuiCard-root.css-1kbwkqu:nth-child(2) > div.MuiCardContent-root.css-10j5qql:nth-child(3) > div.MuiGrid-root.MuiGrid-container.MuiGrid-spacing-xs-2.css-isbt42 > div.MuiGrid-root.MuiGrid-item.MuiGrid-grid-xs-1.css-1ekasd5:nth-child(1) > div.MuiPaper-root.MuiPaper-elevation.MuiPaper-rounded.MuiPaper-elevation0.MuiCard-root.css-lrcwtp > div.MuiCardContent-root.css-nph2fg:nth-child(3) > div.MuiBox-root.css-10egq61 > div.MuiBox-root.css-0:nth-child(2) > div.MuiGrid-root.MuiGrid-container.MuiGrid-spacing-xs-1.css-tuxzvu > div.MuiGrid-root.MuiGrid-item.MuiGrid-grid-xs-1.css-qqlytg:nth-child(2) > span.MuiButton-root.MuiButton-contained.MuiButton-containedInfo.MuiButton-sizeMedium.MuiButton-containedSizeMedium.MuiButton-fullWidth.MuiButtonBase-root.css-1garcay')
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\pyppeteer\frame_manager.py", line 855, in __await__
    raise result
pyppeteer.errors.TimeoutError: Waiting for selector "div.MuiPaper-root.MuiPaper-elevation.MuiPaper-rounded.MuiPaper-elevation0.MuiCard-root.css-bch5q4 > div.MuiCardContent-root.css-10j5qql:nth-child(3) > div.MuiPaper-root.MuiPaper-elevation.MuiPaper-rounded.MuiPaper-elevation0.MuiCard-root.css-1kbwkqu:nth-child(2) > div.MuiCardContent-root.css-10j5qql:nth-child(3) > div.MuiGrid-root.MuiGrid-container.MuiGrid-spacing-xs-2.css-isbt42 > div.MuiGrid-root.MuiGrid-item.MuiGrid-grid-xs-1.css-1ekasd5:nth-child(1) > div.MuiPaper-root.MuiPaper-elevation.MuiPaper-rounded.MuiPaper-elevation0.MuiCard-root.css-lrcwtp > div.MuiCardContent-root.css-nph2fg:nth-child(3) > div.MuiBox-root.css-10egq61 > div.MuiBox-root.css-0:nth-child(2) > div.MuiGrid-root.MuiGrid-container.MuiGrid-spacing-xs-1.css-tuxzvu > div.MuiGrid-root.MuiGrid-item.MuiGrid-grid-xs-1.css-qqlytg:nth-child(2) > span.MuiButton-root.MuiButton-contained.MuiButton-containedInfo.MuiButton-sizeMedium.MuiButton-containedSizeMedium.MuiButton-fullWidth.MuiButtonBase-root.css-1garcay" failed: timeout 30000ms exceeds.

如果方便的話,請留下你的 dc tag

[錯誤回報]

哪個指令出錯了?

/profile角色展示

如果可行的話,請告訴我重現該錯誤的步驟

更改語言成EN(英文)以後就無法使用

請貼上「除錯用訊息」

Traceback (most recent call last):
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
return await self._callback(self.binding, interaction, **params) # type: ignore
File "C:\Users\alice\shenhe_public\cogs\genshin.py", line 851, in profile
data: EnkaNetworkResponse = await enka_client.fetch_user(uid)
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\enkanetwork\client.py", line 65, in fetch_user
return EnkaNetworkResponse.parse_obj(data)
File "pydantic\main.py", line 521, in pydantic.main.BaseModel.parse_obj
File "pydantic\main.py", line 339, in pydantic.main.BaseModel.init
File "pydantic\main.py", line 1038, in pydantic.main.validate_model
File "pydantic\fields.py", line 857, in pydantic.fields.ModelField.validate
File "pydantic\fields.py", line 1074, in pydantic.fields.ModelField._validate_singleton
File "pydantic\fields.py", line 1121, in pydantic.fields.ModelField._apply_validators
File "pydantic\class_validators.py", line 313, in pydantic.class_validators._generic_validator_basic.lambda12
File "pydantic\main.py", line 686, in pydantic.main.BaseModel.validate
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\enkanetwork\model\players.py", line 119, in init
super().init(**data)
File "pydantic\main.py", line 339, in pydantic.main.BaseModel.init
File "pydantic\main.py", line 1038, in pydantic.main.validate_model
File "pydantic\fields.py", line 857, in pydantic.fields.ModelField.validate
File "pydantic\fields.py", line 1074, in pydantic.fields.ModelField._validate_singleton
File "pydantic\fields.py", line 1121, in pydantic.fields.ModelField._apply_validators
File "pydantic\class_validators.py", line 313, in pydantic.class_validators._generic_validator_basic.lambda12
File "pydantic\main.py", line 686, in pydantic.main.BaseModel.validate
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\enkanetwork\model\players.py", line 26, in init
icon = Assets.character_icon(str(data["avatarId"]))
KeyError: 'avatarId'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
await command._invoke_with_namespace(interaction, namespace)
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
return await self._do_call(interaction, transformed_values)
File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 668, in _do_call
raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'profile角色展示' raised an exception: KeyError: 'avatarId'

如果方便的話,請留下你的 dc tag

櫻花冰棒#1190

[功能請求] /characters

請描述你的想法

  • 一個需要註冊才能使用的指令
  • 顯示所有使用者擁有的角色
  • 列表式
  • 只顯示命座精煉跟等級
  • 照元素分類
  • 方便深淵幫配隊等用途

[錯誤回報] flow shop

哪個指令出錯了?
/shop

如果可行的話,請告訴我重現該錯誤的步驟

請貼上「除錯用訊息」'

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_bot\cogs\flow.py", line 306, in show
    view = FlowCog.ShopItemView(item_names, 'buy', self.bot.db, self.bot, i.user)
TypeError: FlowCog.ShopItemView.__init__() takes 5 positional arguments but 6 were given

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 664, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'shop商店' raised an exception: TypeError: FlowCog.ShopItemView.__init__() takes 5 positional arguments but 6 were given

如果方便的話,請留下你的 dc tag

/wish luck 找不到 up_guarantee 的值

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_bot\cogs\wish.py", line 274, in wish_analysis
    get_num, use_pull, left_pull, up_guarantee = await self.char_banner_calc(
  File "C:\Users\alice\shenhe_bot\cogs\wish.py", line 180, in char_banner_calc
    return get_num, use_pull, left_pull, up_guarantee
UnboundLocalError: local variable 'up_guarantee' referenced before assignment

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 668, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'luck歐氣值' raised an exception: UnboundLocalError: local variable 'up_guarantee' referenced before assignment

[錯誤回報] /wiki

哪個指令出錯了?

/wiki

如果可行的話,請告訴我重現該錯誤的步驟

請貼上「除錯用訊息」

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 649, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\alice\shenhe_public\cogs\genshin.py", line 1383, in wiki
    await GeneralPaginator(i, embeds, [GenshinCog.MaterialButton(material_embed), GenshinCog.WikiPageChooseSelect(options)]).start(embeded=True, edit_original_message=True)
  File "C:\Users\alice\shenhe_public\utility\GeneralPaginator.py", line 89, in start
    await self.interaction.edit_original_message(**kwargs)
TypeError: Interaction.edit_original_message() got an unexpected keyword argument 'ephemeral'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1157, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 675, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\alice\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 664, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'wiki原神百科' raised an exception: TypeError: Interaction.edit_original_message() got an unexpected keyword argument 'ephemeral'

如果方便的話,請留下你的 dc tag

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.