Giter Club home page Giter Club logo

Comments (10)

bdistin avatar bdistin commented on July 4, 2024

Uh, this was a thing... If it's broken, that's a bug.

from klasa.

MrJacz avatar MrJacz commented on July 4, 2024

Confirmed bug

from klasa.

kyranet avatar kyranet commented on July 4, 2024

this.client.config.prefix has never been RegExp but string/string[]. This suggestion breaks several pieces including SettingGateway. Althought SGv2 will just throw a TypeError.

from klasa.

MrJacz avatar MrJacz commented on July 4, 2024

I'm sure it was a thing in August I remember using it but I could be tripping this might break SGv2 but maybe there could be a RegexPrefix option in KlasaClientConfig so that RegexPrefix is the main prefix that couldn't be overridden aka Hey Skyra, ping would work always even if you used conf to change the prefix so it is not overridable.

from klasa.

kyranet avatar kyranet commented on July 4, 2024

Just like Komada 0.19.7's usage were so bugged the repeator tag was useless and it was capturing from the argument's position to the end (infinite catching), it got fixed in 0.20.0 with Ao's rewrite and that behaviour dissapeared. There has not been an infinite catching feature in Komada, nor in Klasa, although a bug allowed it to exist.

Same happens here with the prefixes, this.client.config.prefix being a RegExp (but guild prefixes defaulted to string|string[]). That was an unintended behaviour that worked due to a bug, but since the bug is now fixed, that does not longer work.

from klasa.

MrJacz avatar MrJacz commented on July 4, 2024

I see

from klasa.

MrJacz avatar MrJacz commented on July 4, 2024

@kyranet What is your opinion on the regexPrefix option in KlasaClientConfig? I think it would become handy

from klasa.

MrJacz avatar MrJacz commented on July 4, 2024

as mentionPrefix shouldn't be overridden and is only meant for mentionPrefix for the bot...

from klasa.

kyranet avatar kyranet commented on July 4, 2024

My opinion is that regexPrefix is a nice-to-have feature, but most developers will not find it handy. (Keep in mind that RegExp is a feature that many newbie developers find hard to use).

from klasa.

MrJacz avatar MrJacz commented on July 4, 2024

I can agree with it being a nice feature to have and very true that noobie developers dont know the power of Regular expresions

from klasa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.