GithubHelp home page GithubHelp logo

oxmohsen / uniquify-bot Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 16.0 30 KB

uniquify bot will help you to find and delete duplicate files in your channel or group.

License: GNU General Public License v3.0

Procfile 0.17% Python 99.83%
pyrogram pyrogram-bot pyrogram-userbot remove-duplicates telegram-bot

uniquify-bot's Introduction

Hello there ๐Ÿ‘‹

visitors Open Source Love

#!/usr/bin/python
# -*- coding: utf-8 -*-


class SoftwareEngineer:

    def __init__(self):
        self.name = "Mohsen Falakedin"
        self.role = "Software Engineer"
        self.language_spoken = ["fa_IR", "en_US"]

    def say_hi(self):
        print("Thanks for dropping by, hope you find some of my work interesting.")


me = SoftwareEngineer()
me.say_hi()

๐Ÿ”ง Technologies & Tools

๐Ÿ“ˆ GitHub Stats

Mohsen's GitHub Stats Mohsen's GitHub Stats

uniquify-bot's People

Contributors

oxmohsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

uniquify-bot's Issues

Bot is not deleting duplicates if same file uploaded by two different person.

I know bot is deleting files by uid but sometimes this is not enough.

Can you add a feature which allows us to make a choice between uid and "if file name and file sizes are exactly same, delete duplicates"

Uid is not enough if exact same files are uploaded by two different person, please add this feature so we can choose what we want.

That would be really useful, thank you!

Not working

The bot is not responding to any messages

error: struct.error: unpack requires a buffer of 271 bytes

I get:

python3 main.py
[04-Jan-23 10:09:06 - INFO] - bot - Bot DKiller (@CORECT_NAME_OF_bot) started!
Traceback (most recent call last):
  File "main.py", line 3, in <module>
    Bot().run()
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/utilities/run.py", line 80, in run
    run(self.start())
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/storage_local/dkiller_bot/bot.py", line 35, in start
    self.USER, self.USER_ID = await User().start()
  File "/storage_local/dkiller_bot/user.py", line 23, in start
    await super().start()
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/utilities/start.py", line 58, in start
    is_authorized = await self.connect()
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/methods/auth/connect.py", line 40, in connect
    await self.load_session()
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/client.py", line 596, in load_session
    await self.storage.open()
  File "/usr/local/lib/python3.8/dist-packages/pyrogram/storage/memory_storage.py", line 59, in open
    dc_id, api_id, test_mode, auth_key, user_id, is_bot = struct.unpack(
struct.error: unpack requires a buffer of 271 bytes

in my config.py i have:

class Config(object):
    # Get a bot token from @botfather
    TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN", "5...46:AAEE....RQ")

    # Get from my.telegram.org
    APP_ID = int(os.environ.get("APP_ID", "2....4"))

    # Get from my.telegram.org
    API_HASH = os.environ.get("API_HASH", "d....18b")

    # Authorized users to use this bot
    AUTH_USERS = set(int(x) for x in os.environ.get("AUTH_USERS", "5....5").split())

    # session name
    TG_USER_SESSION_NAME = os.environ.get("TG_USER_SESSION_NAME", "oxmohsen")

    # tg user session string
    TG_USER_SESSION_STRING = os.environ.get("TG_USER_SESSION_STRING", "1BJ....Ckk=")

I've redacted the actual values.
Do you have any ideeas what could be wrong?
I've created the bot from another user, not the one under which I'm running the APP ID and HASH, but it should not matter i think as long i have the Bot Token.
Thank you!

Filename too long

It always saying filename too long, i already generated string session 4 times
IMG_20220723_231607_390

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.