{"id":19295649,"url":"https://github.com/swatv3nub/hackfreaks","last_synced_at":"2025-08-01T21:10:55.663Z","repository":{"id":51722366,"uuid":"319011254","full_name":"swatv3nub/Hackfreaks","owner":"swatv3nub","description":"ʜᴀᴄᴋғʀᴇᴀᴋs, ᴀɴᴏᴛʜᴇʀ ᴍᴀʀɪᴇ ᴄʟᴏɴᴇ","archived":false,"fork":false,"pushed_at":"2024-04-12T21:56:06.000Z","size":2807,"stargazers_count":26,"open_issues_count":2,"forks_count":32,"subscribers_count":1,"default_branch":"Delta","last_synced_at":"2025-04-22T08:43:06.790Z","etag":null,"topics":["bot","database","marie","python","telegram","telegram-bot","telegram-bot-api","telethon","telethon-bot"],"latest_commit_sha":null,"homepage":"https://t.me/HackfreaksUpdates","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swatv3nub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"www.telegram.dog/Swonit","github":["swatv3nub"]}},"created_at":"2020-12-06T10:57:32.000Z","updated_at":"2024-05-05T10:36:01.000Z","dependencies_parsed_at":"2024-11-09T22:44:18.023Z","dependency_job_id":"6f1f5e83-62e7-4278-886e-b5a398929c8d","html_url":"https://github.com/swatv3nub/Hackfreaks","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/swatv3nub/Hackfreaks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swatv3nub%2FHackfreaks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swatv3nub%2FHackfreaks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swatv3nub%2FHackfreaks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swatv3nub%2FHackfreaks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swatv3nub","download_url":"https://codeload.github.com/swatv3nub/Hackfreaks/tar.gz/refs/heads/Delta","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swatv3nub%2FHackfreaks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268297408,"owners_count":24228125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","database","marie","python","telegram","telegram-bot","telegram-bot-api","telethon","telethon-bot"],"created_at":"2024-11-09T22:44:04.886Z","updated_at":"2025-08-01T21:10:55.630Z","avatar_url":"https://github.com/swatv3nub.png","language":"Python","funding_links":["www.telegram.dog/Swonit","https://github.com/sponsors/swatv3nub"],"categories":[],"sub_categories":[],"readme":"![MrHackfreaks](https://telegra.ph/file/4538e359834b77487e88b.jpg) \n# MrHackfreaksRobot\n[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)\n[![ForTheBadge built-with-love](http://ForTheBadge.com/images/badges/built-with-love.svg)](https://GitHub.com/swatv3nub/)\u003c/br\u003e\n\n\n![Python Version](https://img.shields.io/badge/python-3.9-green?style=for-the-badge\u0026logo=appveyor)\n![Issues](https://img.shields.io/github/issues/swatv3nub/Hackfreaks?style=for-the-badge\u0026logo=appveyor)\n![Forks](https://img.shields.io/github/forks/swatv3nub/Hackfreaks?style=for-the-badge\u0026logo=appveyor)\n![Stars](https://img.shields.io/github/stars/swatv3nub/Hackfreaks?style=for-the-badge\u0026logo=appveyor)\n![LICENSE](https://img.shields.io/github/license/swatv3nub/Hackfreaks?style=for-the-badge\u0026logo=appveyor)\n![Contributors](https://img.shields.io/github/contributors/swatv3nub/Hackfreaks?style=for-the-badge\u0026logo=appveyor)\n![Repository Size](https://img.shields.io/github/repo-size/swatv3nub/Hackfreaks?style=for-the-badge\u0026logo=appveyor)\u003c/br\u003e\n\n\n[![Join Support!](https://img.shields.io/badge/Support%20Chat-Support-green)](https://t.me/HackfreaksSupport)\n[![Join Updates!](https://img.shields.io/badge/Join%20Channel-Updates-green)](https://t.me/HackfreaksUpdates)\n\nA modular Telegram Python bot running on python3 with a sqlalchemy database.\n\nOriginally a Marie fork, MrHackfreaks evolved further and was built to be more robust. \n\nCan be found on telegram as [MrHackfreaks](https://t.me/MrHackfreaksRobot).\n\nThe Support group can be reached out to at our [SupprtChat](https://t.me/HackfreaksSupport), where you can ask for help about MrHackfreaksRobot,discover/request new features, report bugs, and stay in the loop whenever a new update is available. \n\n\n\n## How to setup/deploy.\n\n### Read these notes carefully before proceeding \n\n - Your code must be open source and a link to your fork's repository must be there in the start reply of the bot. [See this](https://github.com/swatv3nub/hackfreaks?blob/Alpha/Hackfreaks/__main__.py#L25)\n - Lastly, if you are found to run this repo without the code being open sourced or the repository link not mentioned in the bot/UpdatesChannel/SupportChat, we will push a gban for you in our network because of being in violation of the license, you are free to be a dick and not respect the open source code (we do not mind) but we will not be having you around our chats.\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eSteps to deploy on Heroku !! \u003c/summary\u003e\n\n```\nFill in all the details, Deploy!\nNow go to https://dashboard.heroku.com/apps/(app-name)/resources ( Replace (app-name) with your app name )\nTurn on worker dyno (Don't worry It's free :D) \u0026 Webhook\nNow send the bot /start, If it doesn't respond go to https://dashboard.heroku.com/apps/(app-name)/settings and remove webhook and port.\n```\n\n  [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/swatv3nub/Hackfreaks.git) \n\n\u003c/details\u003e  \n\u003cdetails\u003e\n  \u003csummary\u003eSteps to self Host!! \u003c/summary\u003e\n\nNote: This instruction set is just a copy-paste from Marie, note that [HackfreaksSupport](https://t.me/HackfreaksSupport) aims to handle support for @MrHackfreaksRobot and not how to set up your own fork. If you find this bit confusing/tough to understand then we recommend you ask a dev, kindly avoid asking how to set up the bot instance in the support chat, it aims to help our own instance of the bot and not the forks.\n\n  ## Setting up the bot (Read this before trying to use!):\nPlease make sure to use python3.6, as I cannot guarantee everything will work as expected on older Python versions!\nThis is because markdown parsing is done by iterating through a dict, which is ordered by default in 3.6.\n\n  ### Configuration\n\nThere are two possible ways of configuring your bot: a config.py file, or ENV variables.\n\nThe preferred version is to use a `config.py` file, as it makes it easier to see all your settings grouped together.\nThis file should be placed in your `Hackfreaks` folder, alongside the `__main__.py` file. \nThis is where your bot token will be loaded from, as well as your database URI (if you're using a database), and most of \nyour other settings.\n\nIt is recommended to import sample_config and extend the Config class, as this will ensure your config contains all \ndefaults set in the sample_config, hence making it easier to upgrade.\n\nAn example `config.py` file could be:\n```\nfrom Hackfreaks.sample_config import Config\n\nclass Development(Config):\n    OWNER_ID = 1228116248  # your telegram ID\n    OWNER_USERNAME = \"TheFuckErGuy\"  # your telegram username\n    API_KEY = \"your bot api key\"  # your api key, as provided by the @botfather\n    SQLALCHEMY_DATABASE_URI = 'postgresql://username:password@localhost:5432/database'  # sample db credentials\n    JOIN_LOGGER = '-1234567890' # some group chat that your bot is a member of\n    USE_JOIN_LOGGER = True\n    SUDO_USERS = []  # List of id's for users which have sudo access to the bot.\n    LOAD = []\n    NO_LOAD = ['translation']\n```\n\nIf you can't have a config.py file (EG on Heroku), it is also possible to use environment variables.\nThe following env variables are supported:\n - `ENV`: Setting this to ANYTHING will enable env variables\n\n - `TOKEN`: Your bot token, as a string.\n - `OWNER_ID`: An integer of consisting of your owner ID\n - `OWNER_USERNAME`: Your username\n\n - `DATABASE_URL`: Your database URL\n - `JOIN_LOGGER`: optional: a chat where your replied saved messages are stored, to stop people deleting their old \n - `NO_LOAD`: Space-separated list of modules you would like NOT to load\n - `WEBHOOK`: Setting this to ANYTHING will enable webhooks when in env mode\n messages\n - `URL`: The URL your webhook should connect to (only needed for webhook mode)\n - `EVENT_LOGGER` : A chat/Channel to Log all the Events Happening in the Bot like, Gbans, BotAdminPromotions Etc\n - `DRAGONS`: A space-separated list of user_ids which should be considered sudo users\n - `DEMONS`: A space-separated list of user_ids which should be considered support users (can gban/ungban,\n nothing else)\n - `WOLVES`: A space-separated list of user_ids which should be considered whitelisted - they can't be banned.\n - `DONATION_LINK`: Optional: link where you would like to receive donations.\n - `CERT_PATH`: Path to your webhook certificate\n - `PORT`: Port to use for your webhooks\n - `DEL_CMDS`: Whether to delete commands from users which don't have rights to use that command\n - `STRICT_GBAN`: Enforce gbans across new groups as well as old groups. When a gbanned user talks, he will be banned.\n - `STRICT_GMUTE`: Enforce gmutes across new groups as well as old groups. When a gmuted user talks, he will be muted.\n - `WORKERS`: Number of threads to use. 8 is the recommended (and default) amount, but your experience may vary.\n __Note__ that going crazy with more threads wont necessarily speed up your bot, given the large amount of sql data \n accesses, and the way python asynchronous calls work.\n - `BAN_STICKER`: Which sticker to use when banning people.\n - `ALLOW_EXCL`: Whether to allow using exclamation marks ! for commands as well as /.\n\n  ### Python dependencies\n\nInstall the necessary Python dependencies by moving to the project directory and running:\n\n`pip3 install -r requirements.txt`.\n\nThis will install all the necessary python packages.\n\n  ### Database\n\nIf you wish to use a database-dependent module (eg: locks, notes, userinfo, users, filters, welcomes),\nyou'll need to have a database installed on your system. I use Postgres, so I recommend using it for optimal compatibility.\n\nIn the case of Postgres, this is how you would set up a database on a Debian/ubuntu system. Other distributions may vary.\n\n- install postgresql:\n\n`sudo apt-get update \u0026\u0026 sudo apt-get install postgresql`\n\n- change to the Postgres user:\n\n`sudo su - postgres`\n\n- create a new database user (change YOUR_USER appropriately):\n\n`createuser -P -s -e YOUR_USER`\n\nThis will be followed by you need to input your password.\n\n- create a new database table:\n\n`createdb -O YOUR_USER YOUR_DB_NAME`\n\nChange YOUR_USER and YOUR_DB_NAME appropriately.\n\n- finally:\n\n`psql YOUR_DB_NAME -h YOUR_HOST YOUR_USER`\n\nThis will allow you to connect to your database via your terminal.\nBy default, YOUR_HOST should be 0.0.0.0:5432.\n\nYou should now be able to build your database URI. This will be:\n\n`sqldbtype://username:pw@hostname:port/db_name`\n\nReplace sqldbtype with whichever DB you're using (eg Postgres, MySQL, SQLite, etc)\nrepeat for your username, password, hostname (localhost?), port (5432?), and DB name.\n\n  ## Modules\n   ### Setting load order.\n\nThe module load order can be changed via the `LOAD` and `NO_LOAD` configuration settings.\nThese should both represent lists.\n\nIf `LOAD` is an empty list, all modules in `modules/` will be selected for loading by default.\n\nIf `NO_LOAD` is not present or is an empty list, all modules selected for loading will be loaded.\n\nIf a module is in both `LOAD` and `NO_LOAD`, the module will not be loaded - `NO_LOAD` takes priority.\n\n   ### Creating your own modules.\n\nCreating a module has been simplified as much as possible - but do not hesitate to suggest further simplification.\n\nAll that is needed is that your .py file is in the modules folder.\n\nTo add commands, make sure to import the dispatcher via\n\n`from Hackfreaks import dispatcher`.\n\nYou can then add commands using the usual\n\n`dispatcher.add_handler()`.\n\nAssigning the `__help__` variable to a string describing this modules' available\ncommands will allow the bot to load it and add the documentation for\nyour module to the `/help` command. Setting the `__mod_name__` variable will also allow you to use a nicer, user-friendly name for a module.\n\nThe `__migrate__()` function is used for migrating chats - when a chat is upgraded to a supergroup, the ID changes, so \nit is necessary to migrate it in the DB.\n\nThe `__stats__()` function is for retrieving module statistics, eg number of users, number of chats. This is accessed \nthrough the `/stats` command, which is only available to the bot owner.\n\n## Starting the bot.\n\nOnce you've set up your database and your configuration is complete, simply run the bat file(if on windows) or run (Linux):\n\n`python3 -m Hackfreaks`\n\nYou can use [nssm](https://nssm.cc/usage) to install the bot as service on windows and set it to restart on /gitpull \nMake sure to edit the start and restart bats to your needs. \nNote: the restart bat requires that User account control be disabled.\n\nFor queries or any issues regarding the bot please open an issue ticket or visit us at [Hackfreaks Support](https://t.me/HackfreaksSupport)\n## How to setup on Heroku \nFor starters click on this button \n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/swatv3nub/Hackfreaks.git) \n\n\n## Credits\nThe bot is based on the original work done by [PaulSonOfLars](https://github.com/PaulSonOfLars)\nThis repo was just revamped to suit an Anime-centric community. All original credits go to Paul and his dedication, Without his efforts, this fork would not have been possible!\n\nAlso, missing proper credit for blacklistusers taken from TheRealPhoenixBot (will add it later, this note says unless it is done)\n\nAny other authorship/credits can be seen through the commits.\n\nShould any be missing kindly let us know at [Hackfreaks Support](https://t.me/HackfreaksSupport) or simply submit a pull request on the readme.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswatv3nub%2Fhackfreaks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswatv3nub%2Fhackfreaks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswatv3nub%2Fhackfreaks/lists"}