remove deps and change socks proxy definition

This commit is contained in:
синечка ♡ 2026-08-30 15:16:28 +03:00
parent f04d08b6be
commit 889eede593
6 changed files with 19 additions and 26 deletions

View file

@ -30,11 +30,12 @@ from .schedule.saved_groups import *
def run():
import logging
logger.success('Bot', 'Started')
bot.infinity_polling(logger_level=logging.INFO)
# try: bot.infinity_polling(logger_level=1)
try:
bot.infinity_polling(logger_level=9)
...
except KeyboardInterrupt:
logger.error('Bot', 'Stopping...')
return

View file

View file

@ -4,10 +4,10 @@ if __name__ == '__main__':
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import models.logger
CMD = 'python3.13.exe' if sys.platform == 'win32' else 'python3'
CMD = 'python3.13.exe' if sys.platform == 'win32' else 'uv run python'
PROCESSES = [
# Process(target=bot.run if sys.platform == 'win32' else os.system, args=() if sys.platform == 'win32' else (f'{CMD} -c "import bot; bot.run()"',)),
Process(target=bot.run),
Process(target=bot.run if sys.platform == 'win32' else os.system, args=() if sys.platform == 'win32' else (f'{CMD} -c "import bot; bot.run()"',)),
# Process(target=bot.run),
Process(target=event.run),
]

View file

@ -3,14 +3,13 @@ import random
import telebot
import datetime
from telebot.types import ReplyKeyboardMarkup, InlineQueryResultArticle, InputTextMessageContent, Message, ReplyKeyboardRemove, WebAppInfo, KeyboardButton
from telebot import apihelper
import config
from telebot import apihelper
if config.TELEGRAM_PROXY:
apihelper.proxy = {
'http': config.TELEGRAM_PROXY,
'https': config.TELEGRAM_PROXY
}
apihelper.proxy = {
'http': config.TELEGRAM_PROXY,
'https': config.TELEGRAM_PROXY
}
bot = telebot.TeleBot(config.TOKEN, parse_mode='html')

View file

@ -6,9 +6,8 @@ readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"ics>=0.7.3",
"pysocks>=1.7.1",
"pytelegrambotapi>=4.36.1",
"python-dotenv>=1.2.3",
"python-socks>=3.0.0",
"pytz>=2026.3.post1",
"requests[socks]>=2.34.2",
]

20
uv.lock generated
View file

@ -152,21 +152,19 @@ version = "0.1.0"
source = { virtual = "." }
dependencies = [
{ name = "ics" },
{ name = "pysocks" },
{ name = "pytelegrambotapi" },
{ name = "python-dotenv" },
{ name = "python-socks" },
{ name = "pytz" },
{ name = "requests", extra = ["socks"] },
]
[package.metadata]
requires-dist = [
{ name = "ics", specifier = ">=0.7.3" },
{ name = "pysocks", specifier = ">=1.7.1" },
{ name = "pytelegrambotapi", specifier = ">=4.36.1" },
{ name = "python-dotenv", specifier = ">=1.2.3" },
{ name = "python-socks", specifier = ">=3.0.0" },
{ name = "pytz", specifier = ">=2026.3.post1" },
{ name = "requests", extras = ["socks"], specifier = ">=2.34.2" },
]
[[package]]
@ -659,15 +657,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/0d/17/c5c6b53ddc18f297992099b3d9ec16c855c0ccc83263a21fe4d1c625ec6c/python_dotenv-1.2.3-py3-none-any.whl", hash = "sha256:904552145e8bfed22162c09dab1c2b9b54fefa7b23ba780f4f26ca0316b0f0d9", size = 22780, upload-time = "2026-08-16T16:54:52.473Z" },
]
[[package]]
name = "python-socks"
version = "3.0.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/6c/6b/bd9e15e67cf42b318970028a572750924adbe28776e8420fcdfe60838c61/python_socks-3.0.0.tar.gz", hash = "sha256:c20ddf978b5c90467bf242757a11dcd00d7c8bd339901de1839b492d5571ab7f", size = 232731, upload-time = "2026-08-11T11:17:09.464Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/eb/e7/af080d0d2d5bbc3dbdf58a805812ee45175c5c32c6673f23a5480f9785c2/python_socks-3.0.0-py3-none-any.whl", hash = "sha256:e06a421d4d7f3fc17ef2740ab6c291640364f6a362b94a1ae87a136c29bd0067", size = 49519, upload-time = "2026-08-11T11:17:07.118Z" },
]
[[package]]
name = "pytz"
version = "2026.3.post1"
@ -692,6 +681,11 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" },
]
[package.optional-dependencies]
socks = [
{ name = "pysocks" },
]
[[package]]
name = "six"
version = "1.17.0"