Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CustomCommandReplacementMain #58

Open
cherryblossom8915 opened this issue Aug 9, 2022 · 4 comments
Open

CustomCommandReplacementMain #58

cherryblossom8915 opened this issue Aug 9, 2022 · 4 comments

Comments

@cherryblossom8915
Copy link

Command breaks on some searches

image
image

@BlackWolfWoof
Copy link
Owner

Huh weird, that should not happen.
I am gonna try to reproduce it this week and see if i can find the issue.

@cherryblossom8915
Copy link
Author

cherryblossom8915 commented Aug 9, 2022

I tried it with a few different commands and checked something, variable $m is just empty [] which is why it errors out. That's the loop that grabs multiple matching commands, and instead of grabbing something, it seems to grabbing nothing. From what I can tell. Regardless I don't see why the command number would resort to that loop.

It's occurring with a good number of commands. It seems to be commands that are over 2000 characters, which should just output a file, which some commands of mine that are too long are doing, just many of them aren't. One of the commands that isn't displaying is the reaction portion to the CustomCommandReplacement, so that might be a way you can replicate the error.

I hope this helps!

@cherryblossom8915
Copy link
Author

In case it's a command number issue, here's the list of numbers that all don't work. All varying types, cmd, reaction, regex.

20,48,50,65,66,68,77,96,97,103,104,106,108,122,129,130,131,132,133,135,137

Figure the more information you have, the better. But I don't think this part is relevant

@cherryblossom8915
Copy link
Author

I looked a little more into the issue:

I hope my gibberish makes sense

With commands that do attach a file when the output is too long, it checks to see if the "code block" it sends is more than 2000 characters, that works.

However, with the commands that it's failing on, there's no "code block" at all, just the file, so I thought it might be as simple as an "or" statement, {{if or "code block" "file"}} (not proper syntax I know), go to the file loop

But the problem with that solution is when {{$cc := exec "cc" $trigger}} happens, the "file only" situations don't return anything, so then $cc actually has no value. Which then leaves $m empty. It's really a flaw, a call with only a file seems to return empty. It seems like it might be an issue with the bot itself rather than the custom command.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants