{"id":26249470,"url":"https://github.com/randomgamingdev/grass-discord-bot","last_synced_at":"2026-02-11T03:32:53.402Z","repository":{"id":253197302,"uuid":"842779436","full_name":"RandomGamingDev/grass-discord-bot","owner":"RandomGamingDev","description":"A discord bot created to have random modules added to it however you'd like, whether for just yourself or for friends as well it's a great coding experience for all :D","archived":false,"fork":false,"pushed_at":"2024-11-03T21:13:08.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T01:43:21.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/RandomGamingDev.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-15T04:09:20.000Z","updated_at":"2024-11-03T21:13:11.000Z","dependencies_parsed_at":"2024-11-03T22:19:09.450Z","dependency_job_id":"ca4514f9-bb60-4983-815b-402dcb907a40","html_url":"https://github.com/RandomGamingDev/grass-discord-bot","commit_stats":null,"previous_names":["randomgamingdev/grass-discord-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RandomGamingDev/grass-discord-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RandomGamingDev%2Fgrass-discord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RandomGamingDev%2Fgrass-discord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RandomGamingDev%2Fgrass-discord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RandomGamingDev%2Fgrass-discord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RandomGamingDev","download_url":"https://codeload.github.com/RandomGamingDev/grass-discord-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RandomGamingDev%2Fgrass-discord-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29326185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T02:08:56.257Z","status":"ssl_error","status_checked_at":"2026-02-11T02:08:51.338Z","response_time":97,"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":"2025-03-13T15:37:53.532Z","updated_at":"2026-02-11T03:32:53.386Z","avatar_url":"https://github.com/RandomGamingDev.png","language":"Python","readme":"# Grass Bot\n### A discord bot created to have random modules added to it however you'd like, whether for just yourself or for friends as well it's a great coding experience for all :D\n\n## Instructions\nAll modules need to be classes that inherit from the `Module` class which is located in `module.py` and to enable them they must be in the `modules` list in `modules.py`.\nThe order of modules in the `modules` list does matter, since each user message can only have 1 module which is allowed to take control/priority to respond via the default system and deciding which bots can take control/priority before which other modules is based on the ranking which goes from `0` -\u003e `len(modules) - 1` in order.\n\nThe `Module` class has 1 constructor and 2 overridable methods:\n- `get_res(self, msg: discord.Message) -\u003e str`: Gets executed upon user message event unless priority/control is taken before it arrives in the hands of the module. If the module returns `None` priority/control keeps on getting passed on to the following modules; if it returns an empty string control is taken by the module, but nothing gets sent; and if a non-empty string gets sent control is taken by the module and the string is sent as a message\n- `after_res(self, usr_msg: discord.Message, bot_msg: discord.Message) -\u003e None`: If the module took control this will be called after the control is taken and the message is sent if there was a message sent.\n\nThe database used for storing everything is `PostgresSQL` which is also my favorite database :D\n\nFor the postgres database ofc give the permissions needed for the modules to do whatever they need to do and make sure to practice proper SQL hygiene.\n\n## Examples\n- `ping.py`: Responds to `!ping` with `pong!` and reacting both messages to demonstrate the basics.\n- `counter.py`: A basic counter bot that takes the first found number, keeps tracks of records (it responds to wrong counts with ❌, record breaking counts with ☑️, and regular valid counts with ✅) by storing the current `count` (The next number needed), `last_responder` (The last person to respond), and `record` (The record that's been gotten to). This module also uses Postgres to avoid save it when the bot is rebooted.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandomgamingdev%2Fgrass-discord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandomgamingdev%2Fgrass-discord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandomgamingdev%2Fgrass-discord-bot/lists"}