npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

a-wild-button-appears

v3.1.0

Published

A wild BUTTON appears - a useless bot for Slack.

Downloads

2

Readme

A wild BUTTON appears

A completely useless bot for Slack

A wild BUTTON appears is a completely useless bot for Slack. During work days, at a random time between 09:00-16:00, the bot will post a message with a button to Slack channel of choice. The first user to click the button wins, and can enjoy the glory during the rest of the day.

Screenshots

Before clicking

After clicking

Usage

Install the bot, and then proceed by waiting for a wild BUTTON to appear.

Installation, configuration, and running

Installation

Install with a cloud-hosted instance

After installation, you will receive a message by DM in your Slack client. You can then go to the Home tab of wildbutton, where you can configure settings. You need to at least select the proper channel to post buttons to :slightly_smiling_face:

The cloud-hosted service is free to use, and kindly sponsored by Debricked.

Deploy own instance

Configure new Slack app with following properties:

  • Fill in app name, description, icon, and colour.
  • Configure interactive components with the URL ending in /interactive
  • Configure slash commands with the URL ending in /commands
  • Configure event subscriptions with URL ending in /events. Subscribe to bot scope app_uninstall and app_home_opened.
  • Configure bot user/app home. Set Home Tab to active.
  • Configure permissions:
    • Add the redirect url to the URL ending in /auth.
    • Add Bot Token Scopes: commands, channels:read, chat:write, groups:read, im:write, channels:join, chat:write.public.

Configuration

A wild BUTTON appears needs some environmental variables configured. You can either supply them as regular environmental variables in your shell, or put them in a .env file in the same folder as wildbutton.js.

  • MONGO_URL: A connection string to connect to MongoDB. Example: mongodb+srv://user:[email protected]/test?retryWrites=true&w=majority
  • MONGO_DATABASE_NAME: Name of database in Mongo to store the instance data.
  • SLACK_SIGNING_SECRET: Signing secret to verify that the requests comes from Slack
  • SLACK_CLIENT_ID: Client ID for Slack app.
  • SLACK_CLIENT_SECRET: Client secret for Slack app.
  • SLACK_REDIRECT_URI: Publicly available url where Slack should redirect to after adding app (the endpoint ending in /auth)
  • PORT: Port for HTTP server to listen on.
  • SENTRY_DSN: Optional DSN if you want to submit errors to Sentry. Truly optional, if not set, log only to stderr/stdout.
  • SENTRY_ENVIRONMENT: Optional. The environment sent to sentry. Useful if you have e.g. both staging and production.

Running

Launch the handler-standalone.js file with Node.

License

A wild BUTTON appears is licensed under GNU AGPL v3 or later, see the LICENSE file for the full license.

a-wild-button-appears - a slack bot for posting random buttons
Copyright (c) 2018, 2019, 2020, 2021, 2022, Linus Karlsson

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.