vasusen-code / SaveRestrictedContentBot

Stable telegram bot to save Restricted content with custom thumbnail support.
GNU Affero General Public License v3.0
1.54k stars 2.77k forks source link

Error: cannot access local variable 'msg' where it is not associated with a value #99

Open haoduck opened 1 year ago

fexli commented 1 year ago

add the following code:

msg = await userbot.get_messages(chat, msg_id)

after

    if 't.me/c/' in msg_link: #...
    else:  
        edit = await client.edit_message_text(sender, edit_id, "Cloning.")  
        chat = msg_link.split("/")[-2]  
        # <add to here>  <<<
        try: # ...  

in main/plugins/pyroplug.py