mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
refactor, new model e.t.c.
This commit is contained in:
+15
-4
@@ -1,7 +1,18 @@
|
||||
import re
|
||||
from argenta.app import App
|
||||
from argenta.command import Command
|
||||
from argenta.router import Router
|
||||
|
||||
|
||||
def test(string):
|
||||
return bool(re.match(r'\ntest command\n(.|\s)*\nsome command\n', string))
|
||||
router = Router()
|
||||
|
||||
print(test('test command tpgm4tigm4tigmt\n i0hhmi6h some command'))
|
||||
@router.command(Command('test'))
|
||||
def test():
|
||||
print(f'test command')
|
||||
|
||||
@router.command(Command('some'))
|
||||
def test2():
|
||||
print(f'some command')
|
||||
|
||||
app = App()
|
||||
app.include_router(router)
|
||||
app.start_polling()
|
||||
Reference in New Issue
Block a user