Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 3.43 KB

README.md

File metadata and controls

58 lines (38 loc) · 3.43 KB

Sahasrara

An extendable Discord bot framework written on top of WarwickTabletop's Tablebot (built on top of discord-haskell) and inspired by Jeeves and Beanstalk. Note that a lot of commands were stripped from the original version of this bot, but the underlying code remains. If you find code that seems to be unused, it probably is.

Functionality

Card finding:

image

Displaying card art:

image

Displaying card flavour text:

image

Searching cards using NetrunnerDB syntax:

image

Displaying the banlist history of cards:

image

Other functionality:

  • Displaying current and past banlists
  • Displaying Netrunner rules and timing structures
  • Showing random cards with optional constraints
  • Horoscope

Contributing

If you're interested in getting involved in contributing to this bot, and are completely new to git and/or Haskell, you might be interested in looking at the Setup from Scratch section in the contributor's guide. If you want tutorials on making your first plugin or how exceptions work, checkout the tutorials in the tutorials folder.

Environment file setup

Create a .env file containing the following keys. Consult .env.example if you're unsure how this should be formatted! Please note that the .env file must have a newline at the end of it - i.e. the last line should be blank.

  • DEBUG (mandatory) - whether the bot should run in debug mode. This bypasses all permission checks, and prints certain log message that would otherwise be suppressed.
  • DISCORD_TOKEN (mandatory) - the Discord token for your bot. Go to the Discord Developer Portal, create an application representing your bot, then create a bot user and copy its token.
  • PREFIX (optional, defaults to !) - the prefix for each bot command. For example, if you set it to $, then you would call $ping to ping the bot.
  • SQLITE_FILENAME (mandatory) - a name for your SQLite database, for example database.db.
  • MODERATOR_GROUP (optional) - the group ID assigned to moderator members.
  • SUPERUSER_GROUP (optional) - the group ID assigned to the superuser.
  • ALLOW_GIT_UPDATE (mandatory) - whether superusers can update the bot from git through Discord.
  • EMOJI_SERVERS (optional) - a list of server IDs that the bot will search for emoji within.

The two Group settings are optional, but without them any commands that require elevated permissions will not be able to be called when DEBUG is false. Users with the superuser group are able to run every command (including some dangerous ones), so caution should be used when setting these up.

If you have any difficulties setting it up, see the contributor's guide for a walkthrough.