mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
fix
This commit is contained in:
+9
-1
@@ -5,11 +5,17 @@ from telegram import Message
|
||||
from telegram.ext import Application, CallbackContext, ExtBot
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
@dataclasses.dataclass(repr=False)
|
||||
class EditMessage:
|
||||
url: str
|
||||
forward: tuple[Message, ...]
|
||||
|
||||
def __str__(self):
|
||||
forward = ", ".join(f"Message({f.id})" for f in self.forward)
|
||||
return f"EditMessage(url={self.url}, forward={forward})"
|
||||
|
||||
__repr__ = __str__
|
||||
|
||||
|
||||
class ChatData:
|
||||
def __init__(self):
|
||||
@@ -22,6 +28,8 @@ class ChatData:
|
||||
return f"ChatData(forward_channel_id={self.forward_channel_id}, edit_before_forward={self.edit_before_forward}, " \
|
||||
f"edit_message={self.edit_message}, template={self.template})"
|
||||
|
||||
__repr__ = __str__
|
||||
|
||||
|
||||
class CustomContext(CallbackContext[ExtBot, dict, ChatData, dict]):
|
||||
def __init__(
|
||||
|
||||
Reference in New Issue
Block a user