Delete Group
This command deletes a group of CAH card packs.
For more information about the CAH card pack system, see this page.
Trigger
Type: Command
Trigger: delgroup
Usage
-delgroup <group-name>
- Deletes the CAH card pack with the given name.
tip
If your group name has spaces in it, you need to put quotes around it: -delgroup "group name"
.
Code
{{/*
Deletes a group of CAH card packs.
See <https://yagpdb-cc.github.io/fun/cah-groups/delgroup> for more information.
Author: LRitzdorf <https://github.com/LRitzdorf>
*/}}
{{ $fullKey := joinStr "" "group " (index .CmdArgs 0) }}
{{ if ne (len .CmdArgs) 1 }}
Command usage: `-delgroup "group name"`
Use group names previously set up with the `-setgroup` command, viewable with `-listgroups`.
You can have a group name with spaces, but make sure to put it in quotes!
{{ else if (dbGet 0 $fullKey) }}
{{ dbDel 0 $fullKey }}
Pack group `{{index .CmdArgs 0}}` deleted.
{{ else }}
Pack group `{{index .CmdArgs 0}}` does not exist.
{{ end }}
Author
This custom command was written by @LRitzdorf.