jdconner / skwad-civ6-slack-notifier

Home Page:skwad-civ6-slack-notifier.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Civilization VI Slack Notifier Deploy with Vercel

This project aims to make deploying your own Civilization VI Play By Cloud webhook as easy as possible. It currently only supports Slack, Discord may be supported in the future but there is already an excellent project catering to that use case.

Setup

Prequisites

Create a slack webhook

Deploy Button Setup (Recommended)

The easiest way to get started is to click the Deploy with Vercel button in the header. You will be asked to create a Vercel account, which is free. After going through the wizard, you will be asked to provide the slack webhook url as the SLACK_WEBHOOK_URL environment variable. Navigate to the deployment once complete - the landing page will present you with the webhook URL you can use to configure the Play By Cloud Webhook URL setting in the game options.

Manual Setup (Advanced)

  • Clone/fork this repo
  • Sign up for an account at Vercel
  • Install the vercel-cli: npm install -g vercel
  • Login to vercel: vercel login
  • Add an environment variable for your webhook: vercel env add SLACK_WEBHOOK_URL <url>
  • Deploy the stack: vercel --prod
  • After the deployment is complete, a URL will be copied to your clipboard. Paste the following into your Play by Cloud Webhook setting in your Civ VI game: {vercel_deployment_url}/api/webhook

Optional Enhancements

If you want to include @ mentions in your turn notifications, you can also add a USER_MAP_JSON environment variable. It expects a parseable JSON string with a map of civ_user->slack_user_id:

{"TEST_USER1":"UMTQRM61L","TEST_USER2":"UMK866NQZ"}

You can find a user's slack_user_id with the steps in this article

Prior Art

Brett Andrews' work on his https://civ.halfstack.software/ service and the subsequent blog posts were what sparked the idea for this project.

About

skwad-civ6-slack-notifier.vercel.app


Languages

Language:JavaScript 51.2%Language:HTML 48.8%