Skip to content

Instantly share code, notes, and snippets.

@FranciscoOnt
Last active March 7, 2022 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FranciscoOnt/2ffce940c3e8f17181d2438b3dcc6591 to your computer and use it in GitHub Desktop.
Save FranciscoOnt/2ffce940c3e8f17181d2438b3dcc6591 to your computer and use it in GitHub Desktop.
Pilinga Bot Code v2
{{ $pilingaMode:= "" }}
{{/* Who, How much */}}
{{ $selfNormal:= cslice "A {user} le mide {pilinga}cm de rica pilinga." "{user} tiene un sable de {pilinga}cm." }}
{{ $selfShort:= cslice "{user} pilingan't" "error 404 - {user}'s Pilinga not found." }}
{{ $selfInside:= cslice "A {user} le metieron una rica pilinga de {pilinga}cm!" "{user} tiene una rica pilinga de {pilinga}cm... pero adentro!"}}
{{/* Who, How much, Whom */}}
{{ $whoNormal:= cslice "{user} le mide los {pilinga}cm de pilinga a {target}" "{user} sostiene con ambas manos los {pilinga}cm de pilinga de {target}" }}
{{ $whoShort:= cslice "{user} le quiso medir la pilinga a {target} pero no la encontro." "{user} no encontro la pilinga de {target}" }}
{{ $whoInside:= cslice "{user} le mete un pilongon de {pilinga}cm a {target}" }}
{{ $whoKiss:= cslice "le da un besito 😘" "lo acaricia" }}
{{ $whoEat:= cslice "se la come 🍆" "se la traga 🍆" }}
{{ $pilinga:= 0 }}
{{ $kiss:= 0 }}
{{ $eat:= 0 }}
{{ $msg:= "" }}
{{ if eq (len .Message.Mentions) 1 }}
{{ if eq (index .Message.Mentions 0).Username .User.Username }}
{{ $pilingaMode = "self" }}
{{ $pilinga = randInt -1 27 }}
{{ else }}
{{ $pilingaMode = "who" }}
{{ $pilinga = randInt -1 30 }}
{{ $kiss = randInt -1 2 }}
{{ $eat = randInt -1 10 }}
{{ end }}
{{ else }}
{{ $pilingaMode = "self" }}
{{ $pilinga = randInt -1 27 }}
{{ end }}
{{ if eq $pilingaMode "self" }}
{{ if ge $pilinga 1 }}
{{ $phrase:= randInt 0 (len $selfNormal) }}
{{ $msg = index $selfNormal $phrase }}
{{ else }}
{{ if le $pilinga -1 }}
{{ $pilinga = randInt 20 30 }}
{{ $phrase:= randInt 0 (len $selfInside) }}
{{ $msg = index $selfInside $phrase }}
{{ else }}
{{ $phrase:= randInt 0 (len $selfShort) }}
{{ $msg = index $selfShort $phrase }}
{{ end }}
{{ end }}
{{ else }}
{{ if ge $pilinga 1 }}
{{ $phrase:= randInt 0 (len $whoNormal) }}
{{ $msg = index $whoNormal $phrase }}
{{ else }}
{{ if le $pilinga -1 }}
{{ $pilinga = randInt 20 30 }}
{{ $phrase:= randInt 0 (len $whoInside) }}
{{ $msg = index $whoInside $phrase }}
{{ else }}
{{ $phrase:= randInt 0 (len $whoShort) }}
{{ $msg = index $whoShort $phrase }}
{{ end }}
{{ end }}
{{ if ge $pilinga 26 }}
{{ if le $eat -1 }}
{{ if le $kiss -1 }}
{{ $phraseA:= randInt 0 (len $whoKiss) }}
{{ $phraseB:= randInt 0 (len $whoEat) }}
{{ $msg = joinStr ", " $msg (index $whoKiss $phraseA) }}
{{ $msg = joinStr " y " $msg (index $whoEat $phraseB) }}
{{ else }}
{{ $phrase:= randInt 0 (len $whoEat) }}
{{ $msg = joinStr " y " $msg (index $whoEat $phrase) }}
{{ end }}
{{ else }}
{{ if le $kiss -1 }}
{{ $phrase:= randInt 0 (len $whoKiss) }}
{{ $msg = joinStr " y " $msg (index $whoKiss $phrase) }}
{{ end }}
{{ end }}
{{ else }}
{{ if le $kiss -1 }}
{{ $phrase:= randInt 0 (len $whoKiss) }}
{{ $msg = joinStr " y " $msg (index $whoKiss $phrase) }}
{{ end }}
{{ end }}
{{ end }}
{{ if eq $pilingaMode "self" }}
{{ $msg = reReplace "{user}" $msg .User.Mention }}
{{ $msg = reReplace "{pilinga}" $msg (toString $pilinga) }}
{{ $msg }}
{{ else }}
{{ $msg = reReplace "{user}" $msg .User.Mention }}
{{ $msg = reReplace "{pilinga}" $msg (toString $pilinga) }}
{{ $msg = reReplace "{target}" $msg (index .Message.Mentions 0).Mention }}
{{ $msg }}
{{ end }}
@Xotl
Copy link

Xotl commented Mar 2, 2022

Dejo link a la documentación:

https://docs.yagpdb.xyz/reference/templates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment