mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🐛 Fix TypeError in birthday plugin
This commit is contained in:
parent
18d2590374
commit
8a89721dfa
@ -1,6 +1,6 @@
|
||||
import re
|
||||
from datetime import datetime
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from genshin import Client, GenshinException
|
||||
from genshin.client.routes import Route
|
||||
@ -139,7 +139,7 @@ class BirthdayPlugin(Plugin, BasePlugin):
|
||||
await client.cookie_manager.request(url, method="POST", params=params, json=json)
|
||||
|
||||
@staticmethod
|
||||
def role_to_id(name: str) -> int | None:
|
||||
def role_to_id(name: str) -> Optional[int]:
|
||||
if name == "派蒙":
|
||||
return -1
|
||||
return roleToId(name)
|
||||
|
Loading…
Reference in New Issue
Block a user