/gittag-dbots

i would like to personally blame https://github.com/7coil/gittag for the existence of this repository

gittag-dbots

GitHub based Git Tags for the Discord Bots Discord Server.

Tags are:

  1. Downloaded from the tags folder when someone uses the FETCH prefix git>
  2. The content of the tag is processed via the Handlebars engine.
  3. The resulting output is parsed as JSON

Tags are not:

  • To be used for illegal stuff (Your GitHub and Discord account are going to be destroyed)

Cool

Cute of the Year

This tag uses the moment helper to select a date and output a timestamp for Discord to use.

{
  "embed": {
    "title": "Katie's Cute of the Year is...",
    "description": "Ally!",
    "timestamp": "{{moment "next year" "YYYY-MM-DDTHH:mm:ssZ"}}",
    "footer": {
      "text": "Next COTY will be revealed"
    }
  }
}

Selam Alakum

This tag uses the get helper to get the id property from the author object.
This is wrapped with <@ > to turn this into a mention.

See all available properties here

<@{{get 'id' author}}> Aleyküm Selam kardeşim.

Daily Random

This tag uses the floor, split, multiply, itemAt helpers, along with the dayRandom variable to select one of the COTDs.

{{ itemAt (split "Colour,Cute,Cat,COTD" ",") (floor (multiply dayRandom 4)) }}

This is similar to the following:

return 'Colour,Cute,Cat,COTD'.split(',')[Math.floor(Math.random() * 4)]