mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-15 01:34:38 +08:00
11 lines
250 B
Python
11 lines
250 B
Python
|
from nonebot.adapters import satori
|
||
|
|
||
|
from liteyuki.utils.base.ly_typing import T_MessageEvent
|
||
|
|
||
|
|
||
|
def get_user_id(event: T_MessageEvent):
|
||
|
if isinstance(event, satori.event.Event):
|
||
|
return event.user.id
|
||
|
else:
|
||
|
return event.user_id
|