diff --git a/.gitignore b/.gitignore index 3a624d7..c9e8bf7 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /kills.txt *.mypy_cache *.coverage +/run.sh diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 0000000..8f06158 --- /dev/null +++ b/scripts/.gitignore @@ -0,0 +1,3 @@ +.venv +.mypy_cache +token.txt diff --git a/scripts/debug.py b/scripts/debug.py new file mode 100644 index 0000000..f7f4926 --- /dev/null +++ b/scripts/debug.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +from telepot import Bot +from pprint import pprint + +bot = Bot(open("token.txt").read().strip()) + + +def get_chat_debug(): + users = { + "lerax": 336558555, + "tretanews": 430571154, + } + + chats = { + "commonlispbr": -1001280636766, + "commonlisphq": -1001493125566, + } + + chat_member = bot.getChatMember(chats["commonlisphq"], + users["tretanews"]) + print() + pprint(chat_member) + + +def set_bot_commands(): + commands = [ + { + "command": "kills", + "description": "Retorna a quantidade de trolls decapitados." + }, + { + "command": "ping", + "description": "Verifica se estou vivo. Se eu não responder já sabe." + }, + { + "command": "pass", + "description": "Commando de passe /pass <@username>. Exclusivo para admins do @commonlispbr." + } + ] + + bot.setMyCommands(commands) + pprint(bot.getMyCommands()) diff --git a/scripts/requirements.txt b/scripts/requirements.txt new file mode 100644 index 0000000..7a3d42f --- /dev/null +++ b/scripts/requirements.txt @@ -0,0 +1 @@ +telepot @ git+https://github.com/ryukinix/telepot.git#egg=telepot