mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
✨ 新增sv.get_plugin_prefix()
(#76)
This commit is contained in:
parent
91bc86bd07
commit
8569062749
@ -367,3 +367,10 @@ class SV:
|
|||||||
if unique_id is None:
|
if unique_id is None:
|
||||||
unique_id = str(uuid.uuid4())
|
unique_id = str(uuid.uuid4())
|
||||||
return self._on('message', unique_id, block, to_me, prefix)
|
return self._on('message', unique_id, block, to_me, prefix)
|
||||||
|
|
||||||
|
|
||||||
|
def get_plugin_prefix(plugin_name: str) -> str:
|
||||||
|
plugin = SL.plugins.get(plugin_name)
|
||||||
|
if plugin is None:
|
||||||
|
raise ValueError(f'插件{plugin_name}不存在!')
|
||||||
|
return plugin.prefix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user