diff options
author | clarkzjw <[email protected]> | 2023-02-23 01:09:50 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-02-23 12:07:32 -0800 |
commit | 6aafc4e506e2a9aa72955917f031241be4444c67 (patch) | |
tree | 1c52713792a47bfdae2bb99409f343825bdfc2c2 /bot.py | |
parent | c30cba1bb04945a8000c6089d5dcd376e08b2133 (diff) | |
download | swarm2fediverse-6aafc4e506e2a9aa72955917f031241be4444c67.tar.gz |
bot: add command templates
Diffstat (limited to 'bot.py')
-rw-r--r-- | bot.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -39,7 +39,11 @@ from command import ( | |||
39 | start_command, | 39 | start_command, |
40 | fedi_login_command, | 40 | fedi_login_command, |
41 | cancel_command, | 41 | cancel_command, |
42 | help_command | 42 | help_command, |
43 | tos_command, | ||
44 | toggle_visibility_command, | ||
45 | logout_command, | ||
46 | list_command | ||
43 | ) | 47 | ) |
44 | from config import ( | 48 | from config import ( |
45 | FEDI_LOGIN, | 49 | FEDI_LOGIN, |
@@ -149,7 +153,11 @@ async def main() -> None: | |||
149 | ) | 153 | ) |
150 | 154 | ||
151 | # register handlers | 155 | # register handlers |
152 | application.add_handler(CommandHandler("help", help_command)) | 156 | application.add_handler(CommandHandler("tos", tos_command)) |
157 | application.add_handler(CommandHandler("vis", toggle_visibility_command)) | ||
158 | application.add_handler(CommandHandler("logout", logout_command)) | ||
159 | application.add_handler(CommandHandler("list", list_command)) | ||
160 | application.add_handler(CommandHandler("Help", help_command)) | ||
153 | application.add_handler(checkin_handler) | 161 | application.add_handler(checkin_handler) |
154 | application.add_handler(TypeHandler(type=FediLoginCallbackUpdate, callback=process_oauth_login_callback)) | 162 | application.add_handler(TypeHandler(type=FediLoginCallbackUpdate, callback=process_oauth_login_callback)) |
155 | 163 | ||