kongge fix a bug

This commit is contained in:
xtaodada 2021-06-28 13:37:36 +08:00
parent c64228bc94
commit c9059a3e3e
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
2 changed files with 4 additions and 1 deletions

View File

@ -11,7 +11,10 @@ except ImportError:
@listener(is_plugin=True, outgoing=True, ignore_edited=True) @listener(is_plugin=True, outgoing=True, ignore_edited=True)
async def kongge(context): async def kongge(context):
if jieba_imported and context.text: if jieba_imported and context.text:
if context.text.startswith('-'):
return
seg_list = jieba.cut(context.text) seg_list = jieba.cut(context.text)
seg_txt = ' '.join(seg_list) seg_txt = ' '.join(seg_list)
seg_txt.replace('@ ', '@')
if not seg_txt == context.text: if not seg_txt == context.text:
await context.edit(seg_txt) await context.edit(seg_txt)

View File

@ -522,7 +522,7 @@
}, },
{ {
"name": "kongge", "name": "kongge",
"version": "1.0", "version": "1.01",
"section": "chat", "section": "chat",
"maintainer": "xtaodada", "maintainer": "xtaodada",
"size": "4.0 kb", "size": "4.0 kb",