Allow sending a snippet with !

This commit is contained in:
Dan Elkouby 2019-02-18 17:44:42 +00:00
parent 03e922ed86
commit d274f79d87
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ TYPE_DOCUMENT = 2
snips = storage.snips or {} 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): async def on_snip(event):
loop.create_task(event.delete()) loop.create_task(event.delete())
name = event.pattern_match.group(1) name = event.pattern_match.group(1)