{"id":21640073,"url":"https://github.com/gamemann/discord-mg-bot","last_synced_at":"2025-08-31T19:39:40.977Z","repository":{"id":260882272,"uuid":"882616300","full_name":"gamemann/discord-mg-bot","owner":"gamemann","description":"An open source Discord bot that allows users to play mini-games on Discord servers and get awarded points. Not finished and a work-in-progress.","archived":false,"fork":false,"pushed_at":"2024-11-25T00:34:41.000Z","size":3573,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T00:55:36.228Z","etag":null,"topics":["bot","discord","discord-bot","discord-py","fun","minigames","postgresql","psycopg","stats"],"latest_commit_sha":null,"homepage":"","language":"Python","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/gamemann.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-11-03T09:45:18.000Z","updated_at":"2025-03-27T07:03:40.000Z","dependencies_parsed_at":"2024-11-03T10:25:00.240Z","dependency_job_id":null,"html_url":"https://github.com/gamemann/discord-mg-bot","commit_stats":null,"previous_names":["gamemann/discord-mg-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamemann%2Fdiscord-mg-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamemann%2Fdiscord-mg-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamemann%2Fdiscord-mg-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gamemann%2Fdiscord-mg-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gamemann","download_url":"https://codeload.github.com/gamemann/discord-mg-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248443443,"owners_count":21104418,"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","discord","discord-bot","discord-py","fun","minigames","postgresql","psycopg","stats"],"created_at":"2024-11-25T04:16:08.942Z","updated_at":"2025-04-11T16:52:54.662Z","avatar_url":"https://github.com/gamemann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Not Finished \u0026 A Work In Progress\n\nAn open source [Discord](https://discord.com/) bot written in Python that allows users on servers to play mini-games and get awarded points! So far, there is only a questionnaire game in development, but more games will be added in the future!\n\n**NOTE** - As stated before, this bot is not finished and unusable in its current state. I'm pushing to this repository for transparency with the project and I also want to save to the cloud.\n\n## Previews\nPreviews as of *November 3rd, 2024* (still not finished!).\n\n### Questionnaire\n![Questionnaire GIF](./preview/questionnaire01.gif)\n\n## Command Line Usage\nThe following flags are supported in the command line.\n\n| Name | Flags | Default | Description |\n| ---- | ----- | ------- | ----------- |\n| CFG Path | `-c --cfg` | `./conf.json` | The path to the JSON Config file. |\n| List | `-l --list` | N/A | Lists all values from config. |\n| Help | `-h --help` | N/A | Prints the help menu. |\n\n## Stats \u0026 Database\n*To Do...*\n\n## Configuration\nThe default config file is located at `./conf.json`.\n\n| Name | Key | Type | Default | Description |\n| ---- | --- | ---- | ------- | ----------- |\n| Debug | `debug` | Debug Object | `{}` | The debug object. |\n| General | `general` | General Object | `{}` | The general object. |\n| Discord Bot | `bot` | Discord Bot Object | `{}` | The Discord bot object. |\n| Connections | `connections` | Connections Object | `{}` | The connections object. |\n| Servers | `servers` | Servers Object | `{}` | The servers object. |\n\n### Debug Object\nThe debug object contains settings on debugging.\n\n| Name | Key | Type | Default | Description |\n| ---- | --- | ---- | ------- | ----------- |\n| Verbose Level | `verbose` | int | `1` | The verbose level for debugging. |\n| Log To File | `log_to_file` | bool | `false` | Whether to log to a file. |\n| Log Directory | `log_dir` | string | `./logs` | The logs directory. |\n\n### General Object\nThe general object contains general settings for the project.\n\n| Name | Key | Type | Default | Description |\n| ---- | --- | ---- | ------- | ----------- |\n\n*To Do...*\n\n### Discord Bot Object\nThe Discord Bot object contains settings related to the Discord bot.\n\n| Name | Key | Type | Default | Description |\n| ---- | --- | ---- | ------- | ----------- |\n| Token | `token` | string | `\"\"` | The bot token. |\n\n### Connections Object\nThe connections object contains settings related to the web API and database connections. These settings aren't required, but having both disabled will disable stats.\n\n| Name | Key | Type | Default | Description |\n| ---- | --- | ---- | ------- | ----------- |\n| Web API | `api` | Web API Object | `{}` | The web API object. |\n| Database | `db` | Database Object | `{}` | The database object. |\n\n#### Web API Object\nThe web API object contains settings on the web API for the web back-end.\n\n| Name | Key | Type | Default | Description |\n| ---- | --- | ---- | ------- | ----------- |\n| Enabled | `enabled` | bool | `false` | Whether to enable the web API. |\n| Host | `host` | string | `\"http://localhost\"` | The web host (port may be included). |\n| Token | `token` | string | None | The authorization token passed with each web request. |\n| Web Config | `web_config` | bool | `true` | Whether to pull configuration from the web API when enabled. |\n\n#### Database Object\nThe database object contains settings on the **PostgreSQL** database.\n\n| Name | Key | Type | Default | Description |\n| ---- | --- | ---- | ------- | ----------- |\n| Enabled | `enabled` | bool | `false` | Whether to enable the database. |\n| Host | `host` | string | `\"localhost\"` | The database host. |\n| Port | `port` | int | `5432` | The database port. |\n| Username | `user` | string | `\"root\"` | The database user. |\n| Password | `password` | string | `\"\"` | The database password. |\n| Web Config | `web_config` | bool | `true` | Whether to pull configuration from the database when enabled. |\n\n### Servers Object\nThe server's object contains server-specific settings including what games to run, its settings, and more!\n\nThe object contains sub-objects where the key (string) is the server GUID (you may retrieve this through Discord if you have the proper permissions to the server).\n\nThe value is another object with these settings.\n\n| Name | Key | Type | Default | Description |\n| ---- | --- | ---- | ------- | ----------- |\n| Next Game Random | `next_game_random` | bool | `true` | Whether to pick a random next game. |\n| Next Game Cooldown | `next_game_cooldown` | float | `120.0` | The cooldown between starting a new game when automatically starting a game. |\n| Game Start Auto | `game_start_auto` | bool | `true` | Whether to start games automatically. |\n| Game Start Command | `game_start_cmd` | bool | `true` | Whether to allow starting a game through a command. |\n| Game Start Manual | `game_start_manual` | bool | `true` | Whether to allow starting a specific game manually by passing an argument to the start command. |\n\nThere is also a `games` object that is used for determining what games should be enabled for the server and the games settings. Sub objects inside of the `games` object should contain a key with the game's module name (the file names excluding `.py` in [`src/game`](./src/game), ex: `questionnaire`). The sub-object's value should be another object containing additional settings. Check the config example for more information!\n\n## Web Back-End\nWhile the bot's configuration can be handled locally inside of the JSON config file, you may also setup the bot's web back-end which comes with an authentication system and also allows users to sign in through Discord, invite the bot to their Discord server, and then configure it to their needs.\n\n*Not Finished...*\n\n## Requirements\nThe [Discord.py](https://discordpy.readthedocs.io/en/stable/) Python library is required for this project to run.\n\nWith that said, I also recommend using a Python virtual environment when installing these libraries for development.\n\n```bash\n# Create virtual environment.\npython3 -m venv venv/\n\n# Source new environment.\nsource ./venv/bin/activate\n```\n\nYou may use `pip` to install the requirements with the following command afterwards.\n\n```bash\npip install -r requirements.txt\n```\n\n## Running\nFirstly, make sure you configure the project. I recommend copying the [`conf_ex.json`](./conf_ex.json) to `./conf.json`.\n\nYou may then use Python to run the program. You must run this project with Python version 3 or higher.\n\nHere are some examples.\n\n```bash\n# Run bot with no arguments.\npython3 src/main.py\n\n# Set config file to /etc/discord-mg.json\npython3 src/main.py -c /etc/discord-mg.json\n\n# List all config values.\npython3 src/main.py -l\n\n## Print help menu.\npython3 src/main.py -h\n```\n\n### Running With Docker\n*To Do...*\n\n## Credits\n* [Christian Deacon](https://github.com/gamemann)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamemann%2Fdiscord-mg-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgamemann%2Fdiscord-mg-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgamemann%2Fdiscord-mg-bot/lists"}