Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed the way the commands are imported
Now there's no need to register each command in the commands.py file
- Loading branch information
Ale Sánchez
committed
Jul 31, 2018
1 parent
a695fa8
commit 9c29132
Showing
7 changed files
with
75 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ name = "pypi" | |
|
||
[packages] | ||
python-telegram-bot = "*" | ||
inflection = "*" | ||
|
||
[dev-packages] | ||
pylint = "*" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# encoding: utf-8 | ||
|
||
def main(bot, update): | ||
bot.send_message(chat_id=update.message.chat_id, text="I'm a bot, please talk to me!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
# encoding: utf-8 | ||
from bot.start import main as start | ||
|
||
commands = [ | ||
{ | ||
"command": 'start', | ||
"function": start | ||
commands = { | ||
'test': { | ||
'command': 'other' | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters