Skip to content

blargbot/bbtag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status

BBTag

BBTag is a templating language initially developed for the blargbot discord bot. The core structure of the language is based around the positioning of subtags, defined by a {} pair, with arguments being split by a ; character.

Categories

SubTags are split up into varying categories. Subtags within each category can be accessed by {category.function}. Many functions are also available on the global level, meaning you are able to directly access them through {function}.

General

These subtags are implementations of general programming concepts. These are independent from any discord or bot functionality, and can be easily repurposed to other applications.

  • System - All subtags relating to general programming concepts
  • Array - All subtags relating to the manipulation and usage of arrays. Arrays are rendered out as a json string following the pattern {"n":"arrayName","v":[1,2,3]} if it has come from a variable, otherwise [1,2,3]
  • Math - All subtags that work with number manipulation

Discord

These subtags are all related to discord, and so require that a DiscordContext be supplied to the engine upon execution.

  • Message - All subtags that are used for interacting with discord messages
  • Role - All subtags that are used for interacting with discord roles
  • Guild - All subtags that are used for interacting with discord guilds
  • Channel - All subtags that are used for interacting with discord channels
  • User - All subtags that are used for interacting with discord users

Blargbot

These subtags are used for interacting with blargbots features, and so require a BotContext to be supplied to the engine upon execution.

  • Bot - All subtags used for interacting with blargbot directly

Getting started

For help using the language on blargbot, please visit the blargbot website.

Prerequisites

  • Node.js 6+

Installing

  1. Clone this repository
git clone https://github.com/blargbot/bbtag.git
  1. Install the dependent packages
npm install
  1. Run the typescript compiler in watch mode
npm run build

You can now start developing within the /src folder and your changes will be compiled as you work.

Running the tests

There are tests set up with the intention of covering all the code written for this project. To run them, you simply need to use

npm run test

All tests should successfully pass. This is verified by our CI process. All tests must pass before any PR will be accepted.

Built with

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GNU AGPLv3 License - see the LICENSE.md file for more information

About

The BBTag implementation used by blargbot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published