mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5483855de8
|
||
|
|
052163084b
|
||
|
|
cdee105c60
|
||
|
|
fae3dad43a
|
||
|
|
f4c53719d8
|
@@ -13,7 +13,7 @@ ADMIN = [int(i) for i in os.getenv("BOT_ADMIN", "").split(",") if i]
|
||||
|
||||
PIXIV_REFRESH_TOKEN = os.getenv("PIXIV_REFRESH_TOKEN")
|
||||
|
||||
WEBHOOK = os.getenv("WEBHOOK", False)
|
||||
WEBHOOK = os.getenv("WEBHOOK").strip().lower() in ("true", "yes", "1")
|
||||
if WEBHOOK:
|
||||
WEBHOOK_LISTEN = os.getenv("WEBHOOK_LISTEN", "0.0.0.0")
|
||||
WEBHOOK_PORT = int(os.getenv("WEBHOOK_PORT", 8443))
|
||||
|
||||
@@ -305,6 +305,7 @@ def main():
|
||||
MessageHandler((filters.Regex(regex.x_url) | filters.Regex(regex.pixiv_url)) | filters.Regex(
|
||||
regex.bsky_url) & filters.ChatType.PRIVATE,
|
||||
handel_url_media),
|
||||
CommandHandler("start", cmd_start),
|
||||
CommandHandler("set_forward_channel", cmd_set_forward_channel),
|
||||
CommandHandler("remove_forward_channel", cmd_remove_forward_channel),
|
||||
CommandHandler("edit_before_forward", cmd_edit_before_forward),
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
python-telegram-bot[webhooks]~=21.7
|
||||
python-telegram-bot[webhooks]~=22.5
|
||||
httpx[http2]~=0.27
|
||||
uvloop~=0.21; sys_platform != 'win32'
|
||||
uvloop~=0.22; sys_platform != 'win32'
|
||||
async-pixiv @ git+https://github.com/TheFunny/async-pixiv@main
|
||||
+2
-2
@@ -84,7 +84,7 @@ class Tweet:
|
||||
|
||||
@cached_property
|
||||
def url(self) -> str:
|
||||
return f"https://twitter.com/{self._author_id}/status/{self._id}"
|
||||
return f"https://x.com/{self._author_id}/status/{self._id}"
|
||||
|
||||
@property
|
||||
def author(self) -> str:
|
||||
@@ -92,7 +92,7 @@ class Tweet:
|
||||
|
||||
@cached_property
|
||||
def author_url(self) -> str:
|
||||
return f"https://twitter.com/{self._author_id}"
|
||||
return f"https://x.com/{self._author_id}"
|
||||
|
||||
@property
|
||||
def text(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user