Giter Site home page Giter Site logo

houston-discord's Introduction

Astro's own Houston, a bot made to make the life of everyone within the Astro community easier.

Setting up locally

Setting up Houston Bot locally might require some work depending on your experience with Discord's developer platform.

git clone https://github.com/withastro/houston-discord
pnpm install

After having cloned the repository and having all dependencies installed, you'll want to create a file for your enviroment variables. To do this, make a copy of .dev.vars.example and rename that to .dev.vars. To run the bot locally, you will need to create a discord bot. There are plent of guides online on how to do this.

After you have created your bot, set DISCORD_TOKEN, DISCORD_CLIENT_ID and DISCORD_PUBLIC_KEY in your newly created .dev.vars file. If you want to use commands that require any other enviroment variables, remove the comment and set those values too.

Registering commands

If this is your first time setting up the bot, or you have modified any of the commands, you will need to signal discord that changes were made to the commands. To do this, it's as easy as running the command pnpm register.

Running the bot

Since this bot is running as a cloudflare worker instead of on a server, getting the bot connected to discord is slightly more difficult.

First, you will want to run the command pnpm dev. This will start a local instance of the bot. Take note of the port logged to the console.

After you have your bot running, you will need a service to forward that port to the internet. You could use ngrok, cloudflare tunnels or any other port forwarding utility for this.

Finally, after you have a publically accessible URL for your local instance, go to the developer portal and set the INTERACTIONS ENDPOINT URL. If Discord successfully allows you to save the URL, you are good to go.

Depending on your port forwarding utility, you may need to repeat the last step every time you stop it or restart your computer.

houston-discord's People

Contributors

delucis avatar florian-lefebvre avatar fredkschott avatar jutanium avatar mandar1jn avatar martrapp avatar natemoo-re avatar thomasbnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

houston-discord's Issues

cloudflare (work in progress, to be updated)

(work in progress, to be updated)

Infra

Must-Haves

Stretch Goals

  1. RFC feature

Add a new `/ptal` command

Just an idea, but it would be a nice quality of life improvement for any maintainers to have a /ptal command (PTAL stands for "Please Take a Look").

This command would could accept a few types of links. It would make sense to require at least one link but allow up to three.

  • A link to GitHub
  • A link to a preview deployment on Vercel or Netlify
  • A link to a document on Notion or HackMD

This command could also accept an extended description for the message. If a GitHub link is included, maybe the description and title could be auto-populated from the PR?

The output of this command would be a nicely formatted message with pretty links to the relevant pages. Here are some examples from the Docs, Platform, and UI teams. Currently this is all done manually and the formatting is inconsistent.

CleanShot 2023-10-04 at 15 23 23@2x
CleanShot 2023-10-04 at 15 23 32@2x
CleanShot 2023-10-04 at 15 23 44@2x

Rethinking the docs commands

After feedback, it has become clear that the docs command needs some rethinking. Opened this issue to gather feedback and possible changes

discord bot specific dev channel

as this point is important for the development of Houston discord bot, I would like to pin it on an issue so that we can remember it.

Original message idea from @natemoo-re on discord discussion

in the future, we can discuss this point and consider if we either want to stick to github issues to centralize all tasks or if we fallback on another tool less intrusive to the repo and keep github issues for code specific changes, candidates would be creating a github project, although that is also an overhead and yet another place for tasks, we could use the github wiki for both documentation and open tasks at the same place.

Add `/community-call` command

It would be helpful if we had a command that automates some of the annoying, repetitive parts of posting an announcement about the weekly community call! cc @ElianCodes.

Requirements:

  • Role-restricted slash command (@maintainers). Can be posted in any channel.
  • Automates the following fields in an embed:
    • WHEN: Localized timestamp when the event begins (a shortcut might be to just use "at the top of the hour")
    • WHERE: Link to the #stage channel (it has historically been #stage OR #chat so this might need to be dynamic?)
      • Possible? Share the link to the existing community call event.
    • WHAT Provide an option to customize the announcement message
      • Optionally, link to the agenda for the call? Could just be part of the message, I guess
    • WHO: Option to ping certain roles or just @notify-events? Default would probably be no pings.

New command: `/repro`

I'd like a command with a link to astro.new and an explanatory text to help people send reproductions. Here is what the text could contain:

  • recommend using stackblitz
  • explain that you just need a GitHub account
  • Keep the reproduction minimal (don't copy-paste all your project code in there)

This is not exhaustive

Proposal for `/ptal` command

It would be nice if this command could have the option to add multiple PRs to request a PTAL and not just one.

image

Rename repo to `discord` or `discord-bot`?

We have quite a few repos/projects named Houston! It might make sense to talk about this project a little more generically, although our bot in Discord can absolutely be named Houston still 😉

Collect emojis from survey message

Problem

It is very convenient in Discord to create a survey simply by making a post and pinging a target group then asking to react depending on a choice option. Each emoji counts as one entry from one participant.
It is on the other side very hard to collect those votes or opinions in order to take actions with the target group interested on something.

Solutions

Existing Solutions

Solutions have been suggested to scrape a web browser, but they are not optimal because Discord is smart by lazy loading entries, so an automated scroll and scrape mechanism is needed which si complicated.

Bot Solution

A bot could easily collect the user names and provide them in a list, it is yet to be defined in which form, e.g. command or backend service. A message id would have to be given from which all emojis list votes can be provided.

Add a `/vote` command

We have a well-documented governance process for nominating new members as maintainers/core maintainers for Astro.

These nominations happen in a new thread in the #core or #maintainers channel.

Unfortunately, as the team grows, manually tallying votes becomes increasingly difficult. The process involves hunting down a list of all the currently active maintainers + core, removing any core-in-residency members (no voting privileges), then cross-checking all of the responses to verify that you've correctly recorded everyone's response.

As such, I've been tracking recent nominations in a separate spreadsheet. It'd be nice to have a new /vote command that creates an embed for users to click "Yes / No / Abstain". When a button is pressed, the bot could update an anonymous tally in whatever db we end up using and reply in the thread with the number of votes remaining.

I'm sure there could be further automations in the future, but that seems like a good starting place.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.