DZ-TM/Yagpdb.xyz

suggestion for the message counter

Closed this issue · 4 comments

a command where you can set role rewards when someone have a certain amount of messages

DZ-TM commented

I’m a tad bit busy for now so won’t be able to test but this should be the general code necessary, add it to the bottom of the .* regex cmd:
{{$roleRewards:=dict 10 123456}}{{/* follows msg count, roleid format */}}
{{range $k, $v:=$roleRewards}}
{{- if ge $x $k}}
{{- addRoleID $v}}
{{- end -}}
{{end}}

For some extra info, I’ll remake the message count cmd for when I have more time so it won’t be so basic c: although don’t expect that to happen for at least a few weeks

so next month xddd

I'm happy to create and PR an example version of this if needs be, rather than waiting a few weeks/month for an official publish. :)

DZ-TM commented

Sounds gud