Starter templates

Templates, Deploy button and status badge

Start a bot from a small template that already works here, then let anyone who reads your README deploy it in a few clicks and see whether it is online.

← API docsUpdated

Browse the docs

Start from a template

Each template is a small bot that runs as it is: its code, the file that lists its packages, a .env.example naming the settings it needs, and a README with a Deploy button and how to run it on your own computer. They read their token from the environment, so it never goes in your code.

Each has an optional owner-only /restart command that uses the Silly Development SDK, to show how a bot can manage itself. It is only switched on when you give it an API key, so the bot runs without it.

Discord bot in Python

discord.py · Python

A discord.py bot with a /ping slash command, the token read from the environment, and an optional owner-only /restart.

Main file: main.py

Discord bot in TypeScript

discord.js · TypeScript on Node.js

A discord.js bot written in TypeScript and run through tsx, so there is no build step, with /ping and an optional /restart.

Main file: index.js

Telegram bot in Python

python-telegram-bot · Python

A python-telegram-bot bot that answers /start and echoes messages, using long polling so it needs no public address.

Main file: main.py

Discord bot on Bun

discord.js · TypeScript on Bun

A discord.js bot for Bun, which runs TypeScript as it is and reads .env by itself, with /ping and an optional /restart.

Main file: index.ts

Every template's README has this button:Deploy to Silly Development

Deploy a template

Unzip it, push it to a new repository on your GitHub account, and replace YOUR-NAME/YOUR-REPO in its README's Deploy link with that repository. Then press the button: sign in, pick a server or make a new free one, and confirm. Nothing is changed until you do.

In the server's Startup tab, set the main file to the one named on the template above, and put your bot's token in the server's settings. Every push you deploy after that installs the packages again and restarts the bot.

Add a Deploy button to your README

Any public repository on github.com or gitlab.com can have one. The link is https://sillydev.co.uk/deploy?repository= followed by the repository's https address. Add &branch= to deploy a branch other than main, and &directory= if the bot lives in a folder of the repository rather than at its top.

Whoever presses it sees what will be deployed, signs in or makes an account, and chooses one of their own servers. Linking replaces any repository that server already deploys from, so they are asked to agree to that first. The repository has to be public, since it is fetched without signing in to GitHub or GitLab.

Markdown

[![Deploy to Silly Development](https://sillydev.co.uk/deploy/button.svg)](https://sillydev.co.uk/deploy?repository=https://github.com/YOUR-NAME/YOUR-REPO)

HTML

<a href="https://sillydev.co.uk/deploy?repository=https://github.com/YOUR-NAME/YOUR-REPO"><img src="https://sillydev.co.uk/deploy/button.svg" alt="Deploy to Silly Development"></a>

A branch and a folder

https://sillydev.co.uk/deploy?repository=https://github.com/YOUR-NAME/YOUR-REPO&branch=production&directory=bot

Show whether your bot is online

A status badge is an image for your README that says whether the bot is online, starting, offline or unknown, updated about once a minute. It is off until you turn it on in the server's Settings tab, which gives it a random address and the Markdown to copy. It shows nothing else about the server, and its label says "bot" unless you choose to show the server's name.

You can give it a new address, which retires the old one, or turn it off at any time. The API can do the same: PUT /servers/{server}/settings/badge turns it on, with a key that has the settings.rename permission; see Servers in the reference.

Markdown

[![bot status](https://sillydev.co.uk/badge/YOUR-BADGE-TOKEN.svg)](https://sillydev.co.uk/?ref=badge)

FAQ

Questions

Does pressing a Deploy button change anything straight away?

No. It only shows what would be deployed. Nothing is linked or deployed until you sign in, choose one of your servers and press Deploy, and a server that already deploys from another repository needs you to agree to replacing it first.

Can a Deploy button deploy a private repository?

No, only public ones. To deploy a private repository, connect your GitHub or GitLab account on the server's GitHub tab and link it from there.

Do I need the SDK to use a template?

No. The SDK is only used by the optional /restart command, which stays off until you set an API key. Without it the bot runs just the same.

Read next