Examples

This page outlines examples of SmallD being used. For the Basics outlines example code, designed to demonstrate SmallD in a small amount of code. In the Wild links to larger projects and bots making use of SmallD.

For the Basics

There are example bots included in the github repository here. To run these you will need to setup your bot token in the SMALLD_TOKEN environment variable. Then:

$ mvn compile exec:java \
    -Dexec.mainClass=com.github.princesslana.smalld.examples.<classname>

For example, to run PingBot:

$ mvn compile exec:java \
    -Dexec.mainClass=com.github.princesslana.smalld.examples.PingBot

There is also the SmallD Examples repository that contains additional examples of using SmallD.

In The Wild

  • Disparse. An ergonomic, simple, and easy-to-use command parsing and dispatching library for Discord bots
  • StarMeUp. Dead simple starboard bot.
  • To Twenty Two. A counting game, get to 22.