mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-25 10:02:23 +00:00
kongge 停止维护
This commit is contained in:
parent
37840dd9ef
commit
0ee89ac7d4
19
kongge.py
19
kongge.py
@ -10,11 +10,14 @@ except ImportError:
|
||||
|
||||
@listener(is_plugin=True, outgoing=True, ignore_edited=True)
|
||||
async def kongge(context):
|
||||
if jieba_imported and context.text and not context.via_bot and not context.forward:
|
||||
if context.text.startswith('-') or context.text.startswith('/'):
|
||||
return
|
||||
seg_list = jieba.cut(context.text)
|
||||
seg_txt = ' '.join(seg_list)
|
||||
seg_txt.replace('@ ', '@')
|
||||
if not seg_txt == context.text:
|
||||
await context.edit(seg_txt)
|
||||
try:
|
||||
if jieba_imported and context.text and not context.via_bot and not context.forward:
|
||||
if context.text.startswith('-') or context.text.startswith('/'):
|
||||
return
|
||||
seg_list = jieba.cut(context.text)
|
||||
seg_txt = ' '.join(seg_list)
|
||||
seg_txt.replace('@ ', '@')
|
||||
if not seg_txt == context.text:
|
||||
await context.edit(seg_txt)
|
||||
except:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user