member-counter/bot

[BUG]: Replace counter only replaces the first matching keyword of the string

SeasonPhan opened this issue · 0 comments

Describe the bug
Replace counter only replaces the first matching keyword of the string, this bugs is in both preview command and channel name which has been updated by the bot
To Reproduce
Steps to reproduce the behavior:

  1. use command -preview {replace:a1 a1 a2 a2:a1;firstkey,a2;secondkey}
  2. bot responds:

Channel name preview:
firstkey a1 secondkey a2

Channel topic preview:
firstkey a1 secondkey a2

Expected behavior
the counter should replace all "a1" and "a2", bot should respond:

Channel name preview:
firstkey firstkey secondkey secondkey

Channel topic preview:
firstkey firstkey secondkey secondkey