Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 2.35 KB

README.md

File metadata and controls

41 lines (26 loc) · 2.35 KB

MattBot

Release MattBot

Need help picking a movie? Invite MattBot to join your Discord server!

Getting Started

MattBot is a Discord bot whose sole purpose is to recommend movies starring Matthew McConaughey. It offers two slash commands:

  • ping: Make sure that MattBot is awake
  • movie: Recommend a movie starring Matthew McConaughey

Development

MattBot is a simple TypeScript app. It uses slash-create and runs on Azure Functions.

Run Locally

The fastest way to test your changes is to run MattBot locally, forward its port, and update MattBot Dev's interactions endpoint URL to that forwarded port.

  1. cp .example.env .env
  2. Visit MattBot Dev on the Discord Developer Portal
  3. Update .env with MattBot Dev's information
  4. npm install
  5. npm run dev
  6. Forward the port
  7. Set MattBot Dev's endpoint URL on the Discord Developer Portal

Deploy to Staging

You can use mattbot-dev to test your changes in a real Azure Functions app.

  1. az login
  2. npm install
  3. npm run publish:dev
  4. Set MattBot Dev's endpoint URL to https://mattbot-dev.azurewebsites.net/api/interaction on the Discord Developer Portal

Deploy to Production

You can use the Release MattBot action to trigger a new production release. This action uses an Azure service principal to deploy mattbot globally for all Discord users.