Mock Text
This command mocks text which is given (capitalizes every second letter, small-cases all other letters).
Trigger
Type: Command
Trigger: mock
Usage
-mock <text>
- Mocks the text given.
Example
-mock hello world
Results in hElLo WoRlD
.
Code
{{/*
Mocks text (capitalizes every second letter, lowercases all other letters).
See <https://yagpdb-cc.github.io/fun/mock> for more information.
Author: jo3-l <https://github.com/jo3-l>
*/}}
{{ with .StrippedMsg }}
{{ $out := "" }}
{{ range $k, $v := split (lower .) "" }}
{{- if mod $k 2 }} {{- $out = joinStr "" $out (upper $v) }}
{{- else }} {{- $out = joinStr "" $out $v }} {{- end -}}
{{ end }}
{{ sendMessage nil (cembed
"description" $out
"thumbnail" (sdict "url" "https://cdn.discordapp.com/emojis/316315555453730817.png?v=1")
"color" 16776960
) }}
{{ else }}
Please provide some text for me to mock.
{{ end }}
Author
This custom command was written by @jo3-l.