jp00p / AGIMUS

Discord bot for Friends of Desoto
MIT License
10 stars 9 forks source link

Disallow shouts with user tags #445

Closed bhammerslag closed 10 months ago

bhammerslag commented 11 months ago

I still haven't figured out how to properly test Agimus changes (I am the undisputed champ of saying "I should learn about containers" and then not doing it), but hopefully this change is simple enough.

bhammerslag commented 11 months ago

Well you see my approach is based on being a python novice, so if I can reuse good code and avoid new bugs I'll usually do that.

Your approach will certainly be faster; I'll reimplement with re.search() unless you just want to do it yourself in an omnibus PR.

zmattingly commented 11 months ago

Fire away! Mine will continue limping on for now.

bhammerslag commented 11 months ago

@zmattingly Updated with re.search()

On the one hand this has taught me about the useful python concept of things being "truthy", on the other hand I don't like it philosophically!

rahmcoff commented 11 months ago

We should also take a look at the emoji stripper and decide about that. Because all the word emoji are uppercase, e.g. :BITS: :JINX:, along with :AGIMUS:. Also, anything that doesn't have any letters is considered uppercase. e.g. :47:

mathew-fleisch commented 10 months ago

@bhammerslag you'll probably need to PR from a branch and not a fork to get the tests to pass.