YAGPDB v1.12
Added 2018-12-19 01:25:30 +0000 UTCRelatively small update, the last major update was 1.10 and since then a lot of changes have been happening to the backend of the bot, for starter the bot now has the capability to scale horizontally, which required me to build a shard orchestrating system for that, things are finally stable on that end and i have started on feature development again, so here's possibly the last update for 2018:
General Changes
- Automodv2: Added require/ignore edited messages condition (by https://github.com/Alecat)
- Reputation: added max points to take away
- Fix .StrippedMessage in custom commands
- Templates: Added `sendMessageRetID` and `sendMessageNoEscapeRetID` which is the same as `sendMessage` and `sendMessageNoEscape` but returns the id of the message sent (which can be used in the functions below)
- Templates: Added `{{deleteMessage channel message-id optional-delay-in-seconds}}` (delay is 10 if not specified)
- Templates: Added `{{addMessageReactions channel message-id reactions...}}` which is the same as `addReactions` and `addResponseReactions` but can be used on any messages.
- Reddit: no longer shows content with spoiler tags (discord is actually in the process of adding spoiler tags, they're on ptb already: {{test}})
- Buncho fixes for rare issues on the backend
You can now put newlines inside `{{actions}}`
{{$embed := cembed
"title" (joinStr "" "Hello there, " .User.Username "!")
"description" "This is a description"}}
```
Added `{{parseArgs}}` to custom commands
Allows for you to easily require arguments, and ensure they are properly passed.
{{$args := parseArgs 2 ""
(carg "channel" "channel to send to")
(carg "string" "text to send")}}
{{sendMessage ($args.Get 0).ID ($args.Get 1)}}
```
Syntax for carg: `{{carg type name}}`
Syntax for parseArgs: `{{parseArgs number-of-required-args message-if-wrong-args-passed ...args}}`
Available types for carg:
`int` - whole numbers
`string` - text
`user` - user mentions, has the User type
`userid` - mentions or user id's, has the int type
`channel` - channel mention or ID, has the channel type
More docs on this will come later on docs.yagpdb.xyz