CustomAPI Bug

bug
phantombot
#1

just a bug report for @ScaniaTV when using (customapi ) like below you get this happening due to text being after the custom api

Joined the FamBamily on (customapi https://beta.decapi.me/twitch/followed/KITTYCHAOS/(touser)) ● Catnip: (points) ● Hours: (time) ● Rank: (senderrank)

#2

Is (time) a tag in your bot? It isn’t in mine which causes the error. If I remove that tag (the customapi line is a debug line I put in):

joined
[03-18-2019 @ 23:28:06.977 MDT] (customapi) -> Joined the Channel on (customapi <https://beta.decapi.me/twitch/followed/illusionaryonetoo/IllusionaryBot>) ● Catnip: 1165969  ● Rank: The Bot IllusionaryBot
[03-18-2019 @ 23:28:07.298 MDT] [MUTED] Joined the Channel on No user with the name "illusionaryonetoo" found. ● Catnip: 1165969  ● Rank: The Bot IllusionaryBot

Can try to look at changing the regular expression otherwise to attempt to match the first parenthesis rather than the last.

#3

Try this regex replacement for customapi

\(customapi\s([\w\-\.\_\~\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=]+)\)

The deal is, currently we match on \W, and that is going a little bit above and beyond.

Looks like it works:

The characters chosen are based on RFC 3986.

#4

That worked like a star i dont have (time) in mine but the person that reported the bug to me does

#5

Excellent, I will go ahead and push this change and see if anyone finds problems with it in the Nightly.

#6

PR2120

closed #7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.