All Projects → ytausch → serverless-discord-bot

ytausch / serverless-discord-bot

Licence: MIT license
A serverless Discord Bot template built for AWS Lambda based on Discord's slash commands and the slash-create library.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to serverless-discord-bot

cfsec
Static analysis for CloudFormation templates to identify common misconfiguration
Stars: ✭ 53 (+43.24%)
Mutual labels:  cloudformation, aws-cloudformation, aws-sam
slash-create
🗡️ Creator and handler for Discord's slash commands
Stars: ✭ 244 (+559.46%)
Mutual labels:  slash-commands, slash-command, discord-interactions
Docs
Rapid CloudFormation: Modular, production ready, open source.
Stars: ✭ 209 (+464.86%)
Mutual labels:  cloudformation, aws-cloudformation
Aws Auto Terminate Idle Emr
AWS Auto Terminate Idle AWS EMR Clusters Framework is an AWS based solution using AWS CloudWatch and AWS Lambda using a Python script that is using Boto3 to terminate AWS EMR clusters that have been idle for a specified period of time.
Stars: ✭ 21 (-43.24%)
Mutual labels:  cloudformation, aws-cloudformation
Cfn Create Or Update
Create or update CloudFormation stack also if no updates are to be performed.
Stars: ✭ 59 (+59.46%)
Mutual labels:  cloudformation, aws-cloudformation
Aws Cloudformation Coverage Roadmap
The AWS CloudFormation Public Coverage Roadmap
Stars: ✭ 800 (+2062.16%)
Mutual labels:  cloudformation, aws-cloudformation
Cfn Generic Custom Resource
CloudFormation generic custom resource provider
Stars: ✭ 26 (-29.73%)
Mutual labels:  cloudformation, aws-cloudformation
Quickstart Taskcat Ci
AWS Quick Start Team
Stars: ✭ 57 (+54.05%)
Mutual labels:  cloudformation, aws-cloudformation
Awesome Cloudformation
A curated list of resources and projects for working with AWS CloudFormation.
Stars: ✭ 290 (+683.78%)
Mutual labels:  cloudformation, aws-cloudformation
Cfn Python Lint
CloudFormation Linter
Stars: ✭ 1,770 (+4683.78%)
Mutual labels:  cloudformation, aws-cloudformation
Perun
A command-line validation tool for AWS Cloud Formation that allows to conquer the cloud faster!
Stars: ✭ 82 (+121.62%)
Mutual labels:  cloudformation, aws-cloudformation
cloudwatch-dashboards-cloudformation-sample
A sample project to demonstrate using Cloudformation, how to create and configure CloudWatch metric filters, alarms and a dashboard to monitor an AWS Lambda function.
Stars: ✭ 61 (+64.86%)
Mutual labels:  cloudformation, aws-cloudformation
Goformation
GoFormation is a Go library for working with CloudFormation templates.
Stars: ✭ 671 (+1713.51%)
Mutual labels:  cloudformation, aws-cloudformation
Aws Cloudformation User Guide
The open source version of the AWS CloudFormation User Guide
Stars: ✭ 493 (+1232.43%)
Mutual labels:  cloudformation, aws-cloudformation
cloudformation-resource-schema
The CloudFormation Resource Schema defines the shape and semantic for resources provisioned by CloudFormation. It is used by provider developers using the CloudFormation RPDK.
Stars: ✭ 77 (+108.11%)
Mutual labels:  cloudformation, aws-cloudformation
Troposphere
troposphere - library to create AWS CloudFormation descriptions
Stars: ✭ 4,597 (+12324.32%)
Mutual labels:  cloudformation, aws-cloudformation
Aws Unifi Controller
Example of a Ubiquiti Unifi Controller in AWS using Network Load Balancer for TLS termination
Stars: ✭ 37 (+0%)
Mutual labels:  cloudformation, aws-cloudformation
Cloudformation Cli
The CloudFormation Provider Development Toolkit allows you to author your own resource providers and modules that can be used by CloudFormation.
Stars: ✭ 149 (+302.7%)
Mutual labels:  cloudformation, aws-cloudformation
monitoring-jump-start
Monitor AWS resources with ease
Stars: ✭ 67 (+81.08%)
Mutual labels:  cloudformation, aws-cloudformation
serverless-data-pipeline-sam
Serverless Data Pipeline powered by Kinesis Firehose, API Gateway, Lambda, S3, and Athena
Stars: ✭ 78 (+110.81%)
Mutual labels:  cloudformation, aws-sam

serverless-discord-bot

A serverless Discord Bot template built for AWS Lambda based on Discord's slash commands and the slash-create library.

Introduction

This repository helps you to get started with a serverless AWSLambdaServer setup if you want to use slash-create for your discord bot running on AWS.

It contains a CloudFormation template based on AWS SAM describing the following resources:

Name Source Folder Description
CommandsLayer src/commands_layer Lambda layer containing the slash-create library and your custom slash commands
CreateCommandsFunction
CreateCommandsInvoker
src/create_commands Lambda function that automatically syncs your commands to Discord every time you update them
DiscordInteractionApi - Amazon API Gateway HTTP API receiving incoming interaction requests from Discord
DiscordHandlerFunction src/handler Lambda function responsible for handling and executing your commands

Credentials

Discord credentials are retrieved from an AWS Secrets Manager secret named /dev/serverless_discord_bot/discord you have to create manually before deploying the stack.

It must contain the following (self-explanatory) key/value pairs you get from the Discord Developer Portal:

  • app_id
  • public_key
  • bot_token

Setup

  1. Login to the AWS Management Console
  2. Create a new Secrets Manager secret
    • Secret Type: other
    • Add your Discord credentials (see above)
    • Set the name of the secret to /dev/serverless_discord_bot/discord
  3. Install the AWS SAM CLI. You can optionally also install the AWS Toolkit extension for your IDE.
  4. Clone this repository.
  5. Add your commands in src/commands_layer/nodejs/commands. For more information, refer to the docs linked below. For a quick demo, you can use the default hello command. To use it, set your guild id in the src/commands_layer/nodejs/commands/helloCommand.js file. Note that global commands take up to one hour to update.
  6. Run npm install in the commands layer folder (src/commands_layer/nodejs)
  7. To build and deploy the application, run the following in your shell (alternatively use AWS Toolkit):
sam build
sam deploy --guided
  1. Copy the API Gateway endpoint URL stack output and paste it in the Discord Developer Portal as Interactions Endpoint URL.
  2. Have some fun and build something great!

Usage

Updating your commands

To update your commands, simply edit the code in the commands directory and deploy your changes. CreateCommandsFunction will automatically be called and sync your changes to Discord.

Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].