CrescentHandbook
Bot card
Cards

The Bot card

Make a bot for Discord or Slack! It can run games, answer questions, post memes, remind your friends to drink water… anything people can talk to.

Make a bot that lives on Discord or Slack! A trivia host, a pet the whole server takes care of, a bot that reminds your friends to drink water… anything people can talk to.

What counts

A bot that people interact with in a Discord server or a Slack workspace. Slash commands, buttons, replies to messages, reactions, things that happen when someone joins… all fair game.

It should actually do something when people use it. A webhook that only posts the weather every morning is a bit small for a whole card, so give it something to respond to!

If your bot is mostly passing messages along to an AI API, the interesting part isn’t yours, and that’s a bit thin. Want a bot that holds a conversation on its own? Build it without an LLM and it might fit the Chatterbox card too!

The easiest thing that counts

A dice roller. Type /roll, get a number.

For Discord, make an application in the Discord Developer Portal, give it a bot user, and invite it to a test server. Then, with discord.js:

import { Client, GatewayIntentBits } from "discord.js";

const client = new Client({ intents: [GatewayIntentBits.Guilds] });

client.on("interactionCreate", async (interaction) => {
  if (!interaction.isChatInputCommand()) return;
  if (interaction.commandName === "roll") {
    const n = Math.floor(Math.random() * 6) + 1;
    await interaction.reply(`You rolled a ${n}!`);
  }
});

client.login(process.env.DISCORD_TOKEN);

You’ll also need to register the /roll command once, which the discord.js guide shows you how to do. Prefer Python? discord.py works great too.

For Slack, use Bolt (there’s a JavaScript one and a Python one). Turn on Socket Mode in your app’s settings, and your bot can run on your laptop without needing a public URL, which makes testing way easier.

Keeping it safe

  • Never commit your token. Put it in a .env file and add that to your .gitignore. A token is basically your bot’s password, and bots get hijacked all the time because of tokens pushed to GitHub. If one leaks, reset it right away.
  • Ask for as little as you need. Your bot doesn’t need to be an admin to roll dice! Only request the permissions and intents it actually uses.
  • Don’t keep what you don’t need. If your bot reads messages, store as little of them as you can.
  • Test somewhere quiet. Make your own server or channel to try things out, and please don’t add your bot to big channels on the Hack Club Slack without asking first.

Keeping it online

Your bot only works while your code is running. Hack Club’s Nest gives teenagers a free Linux server, which is perfect for this! Ask in #nest if you get stuck. Any cheap VPS works too.

Going further

  • Buttons and menus. Discord has buttons, select menus and pop-up forms, and Slack has Block Kit. A bot you click around in feels so much nicer than one where you type commands perfectly from memory.
  • Remember things. A small SQLite database lets your bot keep scores, inventories, birthdays, streaks… and then it can run a whole game that lasts for weeks.
  • Multiplayer games. Trivia with a leaderboard, a server-wide pet that gets hungry, a word game where everyone takes turns. Bots are great at games, since everyone’s already in the same place.
  • Hook it up to something. GitHub, a game’s API, your school’s lunch menu, the ISS’s location… A bot that brings something useful into the chat gets used a lot.
  • Voice. Discord bots can join voice channels and play sounds. A soundboard bot is a classic for a reason!

Before you ship

There’s a few things every project needs before we can approve it:

  • It works. It doesn’t have to be finished, but the main thing it does should actually work.
  • All of your code is public, on GitHub or somewhere like it.
  • Anyone can try it, even someone who doesn’t code, in under two minutes of setup.
  • Someone else could rebuild it from your repo and README.

For a bot, we need two links:

  • An invite link that adds your bot to anyone’s server or workspace, with the permissions it needs to work. Try it on a fresh test server first, so you know nothing’s missing!
  • A server or channel we can join, where your bot is already running and we can watch it work.

Your bot has to be online for this, so host it somewhere that stays up (Nest is free!). The only exception is if running it really costs money, like a paid API on every single message. Then, write setup instructions detailed enough that someone else can run their own copy, ideally with one script that does most of the work. Not wanting to deal with hosting doesn’t count, sorry!

A video of your bot is a great extra, but it can’t replace the links.

Shipping one

  • Demo: your invite link, plus the server or channel where we can try it out. Make sure it’s actually running while we review!
  • Screenshot: your bot in the middle of a conversation, doing its thing.
  • README: what it does, a list of its commands, what permissions it needs, and how to run your own copy.
Last updated 15 Oct 2026