Skip to content

sphayden/squidbot-cdk

Repository files navigation

SquidBot-cdk

CDK app to deploy infrastructure for automatically posting Summoners War codes to discord.

Uses Discord webhooks to post embeds with the reward info taken from https://swq.jp/l/en-US/. Embeds look like this:
Embed example

There is a custom step in the process that verifies it is a legit code, so no troll or non-function codes!

Also will expire codes once they no longer become available to redeem, i.e, expired and invalid. After expiring the embed will show when it expired. Example:
Expired example

Infrastructure Info

The infrastructure for this application is hosted on AWS and uses the AWS CDK to deploy and update it programatically.

Total costs for this app depends on how often the EventBridge event is set to trigger but can easily be less than $1 a month.

Getting Started

You can clone this repo and deploy this CDK app yourself, or create a webhook for your channel and message Tyshalle#4084 on discord to get added to an existing implementation.

Prerequisites

  • Node.js needs to be installed.
  • An AWS Account.
  • AWS Credentials to deploy with CDK. Refer to this guide.

Installation steps

  1. Install CDK:
npm install -g aws-cdk
  1. Clone the repository:
git clone https://github.com/sphayden/squidbot-cdk.git
  1. CD into the directory the repository was cloned into.

  2. Bootstrap the CDK using your AWS Account information:

cdk bootstrap aws://ACCOUNT-NUMBER/REGION
  1. Deploy the CDK App:
cdk deploy
  1. Create webhook in your discord channel following these instructions.

  2. Add webhook to the DynamoDB Table and test the step function execution.

  3. Enjoy!

About

squidbot cdk application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages