{"id":37214867,"url":"https://github.com/shitpostingio/admin-bot","last_synced_at":"2026-01-15T00:51:32.693Z","repository":{"id":246582830,"uuid":"821527929","full_name":"shitpostingio/admin-bot","owner":"shitpostingio","description":null,"archived":true,"fork":false,"pushed_at":"2024-06-28T18:48:45.000Z","size":131,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-11T13:57:14.679Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shitpostingio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-28T18:44:27.000Z","updated_at":"2024-06-28T18:53:09.000Z","dependencies_parsed_at":"2024-06-28T21:00:48.103Z","dependency_job_id":null,"html_url":"https://github.com/shitpostingio/admin-bot","commit_stats":null,"previous_names":["shitpostingio/admin-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shitpostingio/admin-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shitpostingio%2Fadmin-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shitpostingio%2Fadmin-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shitpostingio%2Fadmin-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shitpostingio%2Fadmin-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shitpostingio","download_url":"https://codeload.github.com/shitpostingio/admin-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shitpostingio%2Fadmin-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28440578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:34:46.850Z","status":"ssl_error","status_checked_at":"2026-01-15T00:34:46.551Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-15T00:51:31.944Z","updated_at":"2026-01-15T00:51:32.684Z","avatar_url":"https://github.com/shitpostingio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shitposting.io `admin-bot`\n\nIn order to simplify possible database upgrades, it is recommended to run the database in a Docker container.\n\n## Docker\n\n### Install Docker\n\n```bash\nsudo apt install docker.io\n```\n\nBy default, Docker will require superuser permissions to run. To modify this behavior, we need to create the `docker` group if it doesn't already exist, add the connected `$USER` to the `docker` group and relog to apply changes:\n\n```bash\nsudo groupadd docker\nsudo usermod -aG docker $USER\nexit\n```\n\n### Docker configuration\n\nPull the latest PostgreSQL container from the official repository:\n\n```bash\ndocker pull postgres:latest\n```\n\nRun the container and publish the database port to localhost and add an optional name:\n\n```bash\ndocker run -p 127.0.0.1:5432:5432 --name=automod postgres\n```\n\n## PostgreSQL\n\nIn case you aren't using the PostgreSQL docker container you can install the service by using the following command:\n\n```bash\nsudo apt install postgresql postgresql-contrib\n```\n\nLog into Postgres:\n\n```bash\npsql -h localhost -U postgres\n```\n\nCreate the database, the user and grant the user permissions on the table:\n\n```sql\nCREATE DATABASE automod;\nCREATE USER automod WITH PASSWORD 'automod';\nGRANT ALL PRIVILEGES ON DATABASE \"automod\" TO automod;\n```\n\n## Configuration\n\nIt is now necessary to fill in the required data in the configuration file. To do so it's possible to rename `config_example.toml` to `config.toml` and set the required values.\n\n## Table creation\n\nGo to the directory `database/cmd/adminbot-deploy-db`, compile the go file and run it specifying the path to the `config.toml` file:\n\n```bash\ncd database/cmd/adminbot-deploy-db\ngo build\n./adminbot-deploy-database -config path/to/config.toml\n```\n\n## Admin creation\n\nSince this bot will only reply to users whose Telegram ID is in the database, it is necessary to add them to the admin table (to get the Telegram ID of an user you can send a message to [@rawdatabot](https://t.me/rawdatabot)).\n\nGo to the directory `database/cmd/adminbot-add-user`, compile the go file and run it run it specifying the path to the `config.toml` file and the `userid` to add:\n\n```bash\ncd database/cmd/adminbot-add-user\ngo build\n./adminbot-add-user -userid id_to_add -config path/to/config.toml -role mod/admin\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshitpostingio%2Fadmin-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshitpostingio%2Fadmin-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshitpostingio%2Fadmin-bot/lists"}