gittag-dbots
GitHub based Git Tags for the Discord Bots Discord Server.
Tags are:
- Downloaded from the
tags
folder when someone uses the FETCH prefixgit>
- The content of the tag is processed via the Handlebars engine.
- The resulting output is parsed as JSON
- If it is not valid JSON, the output of handlebars is sent.
- If it is JSON, the JSON is sent as part of
TextChannel.createMessage()
as the payload - Please match the Discord specification for anEmbed Object
- https://discordapp.com/developers/docs/resources/channel#embed-object
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.
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
Daily Random
This tag uses the floor
, split
, multiply
, itemAt
helpers, along with the dayRandom
variable to select one of the COTDs.
This is similar to the following:
return 'Colour,Cute,Cat,COTD'.split(',')[Math.floor(Math.random() * 4)]