forked from dymik739/modular-bot-framework-for-telegram
add new module: generic-command-processor
This commit is contained in:
parent
807dee5af1
commit
a530272408
3
modules/generic-command-processor/data.json
Normal file
3
modules/generic-command-processor/data.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"s": "Головна сторінка сервера: http://10.1.1.1:12010/"
|
||||
}
|
6
modules/generic-command-processor/index.py
Normal file
6
modules/generic-command-processor/index.py
Normal file
@ -0,0 +1,6 @@
|
||||
command_storage = json.loads(open(self.path + "data.json").read())
|
||||
|
||||
received_command = self.MESSAGE.text[1:]
|
||||
|
||||
if received_command in command_storage:
|
||||
self.RESPONSE = command_storage[received_command]
|
6
modules/generic-command-processor/meta.json
Normal file
6
modules/generic-command-processor/meta.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": 1,
|
||||
"index_file": "index.py",
|
||||
"start_on_boot": true,
|
||||
"alias": "generic-command-processor"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user