forked from kate/uniborg
Allow sending a snippet with !
This commit is contained in:
parent
03e922ed86
commit
d274f79d87
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue