diff --git a/poster.py b/poster.py index c898213..1c327e3 100644 --- a/poster.py +++ b/poster.py @@ -58,11 +58,11 @@ if "--norun" in argv: # Import =================================================================================================================================== try: - import schedule # type: ignore - from pyrogram import Client, filters, idle # type: ignore - from pyrogram.types import ChatPermissions, ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton, BotCommand, BotCommandScopeChat # type: ignore - from pyrogram.raw.types import UpdateChannelMessageForwards, InputChannel, InputPeerChannel - from pyrogram.raw.functions.stats import GetMessagePublicForwards + import schedule + from pyrogram.sync import idle + from pyrogram.client import Client + from pyrogram import filters + from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, BotCommand, BotCommandScopeChat except ModuleNotFoundError: print(locale("deps_missing", "console", locale=configGet("locale_log")), flush=True) exit() @@ -181,7 +181,7 @@ def send_content(): return index["sent"].append(candidate_file) - index["last_id"] = sent.id + index["last_id"] = sent.id # type: ignore jsonSave(index, configGet("index", "locations")) @@ -458,7 +458,7 @@ if __name__ == "__main__": app.send_message(configGet("admin"), locale("startup", "message", locale=configGet("locale")).format(str(pid))) # type: ignore if configGet("post", "mode"): - t = Thread(target=background_task) + t = Thread(target=background_task) # type: ignore t.start() if configGet("submit", "mode"):