-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
bug: If a file named "ヘルプ.ts" is added to the "commands" folder, the bot fails to start. #460
Comments
I'll be honest, this is more than likely because of the non latin alphabet characters and I don't think there is much we can do about this. I recommend using latin alphabet characters for your file names. That said, I suppose some debugging could be done but I wouldn't expect much out of it. |
I’ll check this later and evaluate if it’s a /pieces issue, a /framework issue, or I CNR and need to see a minimum reproducible sample. |
You certainly have a point. |
Thank you very much! |
Update: This issue cannot be reproduced outside of Japanese Windows, which uses CP932 (Shift-JIS) as default encoding rather than UTF-8/16. Node.js however, reads it correctly as UTF-16 as shown by the debugger. Pending to see whether or not Node.js translates that UTF-16 back to CP932 when reading the file. Repro repository: https://github.com/c7e715d1b04b17683718fb1e8944cc28/my-sapphire-bot |
There seems to be an issue with Node.js v22.13.0 and v23.6.0, both can read file names correctly from a Shift-JIS encoded filesystem, but neither can read files using the same names. Re-encoding Shift-JIS as UTF8 and vice-versa does not seem fix the issue either. The loader works as intended when using Deno, pointing this issue to a bug in Node.js, see similar issue: Will investigate a little deeper, then open an issue in Node.js's tracker. |
Is there an existing issue for this?
Description of the bug
Although the exact cause could not be identified, when a file named "ヘルプ.ts" is added to the "commands" folder, the bot completely stops at "await client.login();", and no logs are displayed.
Steps To Reproduce
Expected behavior
Bot starts normally.
Screenshots
No response
Additional context
No response
System Info
The text was updated successfully, but these errors were encountered: