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