{"id":15326764,"url":"https://github.com/ecshreve/civ-bot-go","last_synced_at":"2026-01-20T12:33:08.465Z","repository":{"id":137305700,"uuid":"266500393","full_name":"ecshreve/civ-bot-go","owner":"ecshreve","description":"multipurpose discord bot for civ 5 written in golang","archived":false,"fork":false,"pushed_at":"2023-02-25T06:02:18.000Z","size":105406,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T12:51:34.496Z","etag":null,"topics":["bot","discord","github-actions","go","heroku"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ecshreve.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":"2020-05-24T08:31:24.000Z","updated_at":"2023-11-18T01:56:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"464654cf-9baf-4588-9a9c-86a1eeda0499","html_url":"https://github.com/ecshreve/civ-bot-go","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ecshreve/civ-bot-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecshreve%2Fciv-bot-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecshreve%2Fciv-bot-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecshreve%2Fciv-bot-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecshreve%2Fciv-bot-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecshreve","download_url":"https://codeload.github.com/ecshreve/civ-bot-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecshreve%2Fciv-bot-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"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":["bot","discord","github-actions","go","heroku"],"created_at":"2024-10-01T09:36:51.986Z","updated_at":"2026-01-20T12:33:08.447Z","avatar_url":"https://github.com/ecshreve.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# civ-bot-go\n\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ecshreve/civ-bot-go/Go) \n![Go Report Card](https://goreportcard.com/badge/github.com/ecshreve/civ-bot-go) \n![Go Version](https://img.shields.io/github/go-mod/go-version/ecshreve/civ-bot-go) \n![Last Commit](https://img.shields.io/github/last-commit/ecshreve/civ-bot-go)\n\u003cbr\u003e\n[![API reference](https://img.shields.io/badge/godoc-reference-5272B4)](https://pkg.go.dev/github.com/ecshreve/civ-bot-go?tab=doc)\n\n\n## Description\n\nThis a multipurpose Discord bot for various operations related to [Sid Meier's Civilization V][2] written in [Go][3].\n\nAt its core the bot handles randomly assigning a group of players lists of civilizations to choose from for a multiplayer game; based on a number of possible configuration options.\n\n## Usage\n\n_Detailed instructions on all available commands are available by running the `/civ help` command. Here's a summary of how to use the bot._\n\n### Configuration\n\nPlayers can enter the configuration flow by entering the `/civ config` command in the channel where the bot is located. Configuration options are set by interacting with the reactions after each configuration option is presented.\n\n![civ confiv](static/config.gif \"civ config\")\n\n### Starting a new session\n\nPlayers can start a new session by entering the `/civ new` command. Players join the game by reacting with the ✋ reaction. When all players are ready someone just needs to react with the ✅ reaction.\n\n![civ new](static/new.gif \"civ new\")\n\n### Banning\n\nDepending on the current configuration each player gets to \"ban\" some number of civs, removing them from the pool of civs that the bot randomly chooses from. Users can enter bans with the `/civ ban \u003carg\u003e` providing either the civilization name, or leader name. The bot does a fuzzy match on the input and finds the closest matching civilization.\n\n![civ ban](static/ban.gif \"civ ban\")\n\n### Picks\n\nAfter all players have selected their bans the bot chooses a random set of civs for each player to choose from.\n\n![civ pick](static/pick.gif \"civ pick\")\n\n### Re-Picks\n\nIf the session is configured to allow for re-picks, and at least half the players react with ♻️ then, then the bot will randomly choose again.\n\n![civ repick](static/repick.gif \"civ repick\")\n\n### Conclusion\n\nOnce the allotted number of repicks is reached, or the timer runs out then you're ready to pick a civ from your list and start playing!\n\n## Running Locally\n\n### Bot Setup\n\n- make a discord application in the [discord developer portal][1]\n- create a bot for you application and set permissions\n\n  ![bot perms](static/botperms.png \"bot perms\")\n\n- add the bot to your discord server\n  - go to the \"OAuth2\" tab, select scope \"bot\", navigate to the URL that gets generated\n- copy the bot token from the \"Bot\" tab and set the `CIV_BOT_TOKEN` environment variable\n\n### Application Setup\n\n- make sure you have `go` installed by running `go version`, you should see some output like `/usr/local/bin/go`\n- clone the repository\n- `cd` into the root directory\n- install dependencies with `go get github.com/ecshreve/civ-bot-go`\n- run the application with `make run`\n- now you can go to whatever channel you added the bot to in the previous section and interact with the bot, enter `/civ help` in the channel to see information about how to use the bot\n\n## References\n\nHere's some links that I used as reference throughout the project:\n\nrepositories:\n\n- [discordgo](https://github.com/bwmarrin/discordgo)\n- [discord-checkers](https://github.com/jmsheff/discord-checkers)\n- [closestmatch](https://github.com/schollz/closestmatch)\n\nhelpful golang links\n\n- [using go modules](https://blog.golang.org/using-go-modules)\n- [golang slice tricks](https://github.com/golang/go/wiki/SliceTricks)\n\nhelpful tooling links\n\n- [hosting a discord bot on heroku](https://medium.com/@mason.spr/hosting-a-discord-js-bot-for-free-using-heroku-564c3da2d23f)\n- [automate deploys to heroku from github](https://devcenter.heroku.com/articles/github-integration)\n- [basic makefiles](https://tutorialedge.net/golang/makefiles-for-go-developers/)\n\n[1]: https://discord.com/developers/applications\n[2]: https://store.steampowered.com/app/8930/Sid_Meiers_Civilization_V/\n[3]: https://golang.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecshreve%2Fciv-bot-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecshreve%2Fciv-bot-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecshreve%2Fciv-bot-go/lists"}