From d274f79d8781ca1e1ec30975faf7e6c06de7248e Mon Sep 17 00:00:00 2001 From: Dan Elkouby Date: Mon, 18 Feb 2019 17:44:42 +0000 Subject: [PATCH] Allow sending a snippet with ! --- stdplugins/snip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdplugins/snip.py b/stdplugins/snip.py index d78c645..afd3b14 100644 --- a/stdplugins/snip.py +++ b/stdplugins/snip.py @@ -16,7 +16,7 @@ TYPE_DOCUMENT = 2 snips = storage.snips or {} -@borg.on(events.NewMessage(pattern=r'\.snip (\S+)', outgoing=True)) +@borg.on(events.NewMessage(pattern=r'(?:\.snip +|!)(\w+)$', outgoing=True)) async def on_snip(event): loop.create_task(event.delete()) name = event.pattern_match.group(1)