{"id":15662922,"url":"https://github.com/braun-steven/bottr","last_synced_at":"2025-06-19T09:33:00.981Z","repository":{"id":57416121,"uuid":"117813448","full_name":"braun-steven/bottr","owner":"braun-steven","description":"Python Reddit Bot Framework","archived":false,"fork":false,"pushed_at":"2018-05-13T00:09:26.000Z","size":90,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-21T13:18:04.426Z","etag":null,"topics":["bot","praw","reddit"],"latest_commit_sha":null,"homepage":"https://bottr.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/braun-steven.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-17T09:20:39.000Z","updated_at":"2025-02-22T12:31:06.000Z","dependencies_parsed_at":"2022-08-23T17:00:17.233Z","dependency_job_id":null,"html_url":"https://github.com/braun-steven/bottr","commit_stats":null,"previous_names":["slang03/bottr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/braun-steven/bottr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braun-steven%2Fbottr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braun-steven%2Fbottr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braun-steven%2Fbottr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braun-steven%2Fbottr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/braun-steven","download_url":"https://codeload.github.com/braun-steven/bottr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/braun-steven%2Fbottr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260724416,"owners_count":23052733,"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","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","praw","reddit"],"created_at":"2024-10-03T13:34:55.676Z","updated_at":"2025-06-19T09:32:55.971Z","avatar_url":"https://github.com/braun-steven.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=====\nBottr\n=====\n\nBottr makes writing bots for reddit easy. It currently provides three predefined bots:\n\n:CommentBot: Listens to new comments in a list of subreddits\n:SubmissionBot: Listens to new submission in a list of subreddits\n:MessageBot: Listens to new messages of the inbox\n\nBottr makes use of the `Python Reddit API Wrapper`\n`PRAW \u003chttp://praw.readthedocs.io/en/latest/index.html\u003e`_.\n\nDocumentation: `bottr.readthedocs.io \u003chttps://bottr.readthedocs.io\u003e`_\n\nCheck out `bottr-template \u003chttps://github.com/slang03/bottr-template\u003e`_ for a convenient code template to start with.\n\nInstallation\n------------\nBottr is available on PyPi and can be installed via\n\n.. code:: bash\n\n    $ pip install bottr\n\n:Latest version: :code:`0.1.4`\n\nQuick Start\n-----------\n\nThe following is a quick example on how to monitor `r/AskReddit` for new comments. If a comment\ncontains the string :code:`'banana'`, the bot prints the comment information\n\n.. code:: python\n\n   import praw\n   import time\n\n   from bottr.bot import CommentBot\n\n   def parse_comment(comment):\n       \"\"\"Define what to do with a comment\"\"\"\n       if 'banana' in comment.body:\n           print('ID: {}'.format(comment.id))\n           print('Author: {}'.format(comment.author))\n           print('Body: {}'.format(comment.body))\n\n   if __name__ == '__main__':\n\n       # Get reddit instance with login details\n       reddit = praw.Reddit(client_id='id',\n                            client_secret='secret',\n                            password='botpassword',\n                            user_agent='Script by /u/...',\n                            username='botname')\n\n       # Create Bot with methods to parse comments\n       bot = CommentBot(reddit=reddit,\n                       func_comment=parse_comment,\n                       subreddits=['AskReddit'])\n\n       # Start Bot\n       bot.start()\n\n       # Run bot for 10 minutes\n       time.sleep(10*60)\n\n       # Stop Bot\n       bot.stop()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraun-steven%2Fbottr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbraun-steven%2Fbottr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbraun-steven%2Fbottr/lists"}