aternosorg / modbot

An open source moderation bot with advanced features developed by Aternos.
MIT License
127 stars 61 forks source link

Badword Editing Type-Changing Quirk and [object Object] #543

Closed ToothyDev closed 1 year ago

ToothyDev commented 1 year ago

When editing a badword's type, the modal / popup that appears will not say "regex" and fill in /regex/flags, but will still show e.g. "Trigger" for when it was a text. Creating the badword like this: image

and then editing it while changing the type to e.g. regex, it will still show it like this image

Also, creating a punishment without any punishment selected yields [object Object] image

ToothyDev commented 1 year ago

The punishment will also revert back to [object Object] when simply using /bad-word edit without any arguments except the ID of course

JulianVennen commented 1 year ago

When editing a badword's type, the modal / popup that appears will not say "regex" and fill in /regex/flags, but will still show e.g. "Trigger" for when it was a text.

If I understand that correctly, you want ModBot to automatically convert your trigger to a regex when you pick the regex option?

ToothyDev commented 1 year ago

No, but the modal should say "Regex" because that's what you're now supposed to put there, since you're changing it to regex

JulianVennen commented 1 year ago

In the title or where?

ToothyDev commented 1 year ago

The title of the text field where it says trigger in my screenshot should then be updated to regex, yes. Basically should look the same as if you created a regex badword from scratch, because on my screenshot it looks like you're creating a normal badword

JulianVennen commented 1 year ago

The title of the Text field (1) also doesn't say regex when you create a bad word. It is however displayed in the modal title (2). image

I think automatically converting the trigger to the matching regex would be a great idea tho

ToothyDev commented 1 year ago

Oh yea my bad then, but an autoconversion would be nice too yes. But the prefilled text should also be changed before currently it isn't last time I tested

JulianVennen commented 1 year ago

What do you mean with that?

ToothyDev commented 1 year ago

Screenshot_20221205_133928_Firefox The gray placeholder

JulianVennen commented 1 year ago

That is already changed according to the new type

ToothyDev commented 1 year ago

My bad, I probably did something wrong when testing it in the first place