mooner1022 / StarLight

Scriptable messenger auto-reply application with plugin support
https://starlight.mooner.dev
GNU General Public License v3.0
43 stars 4 forks source link

별빛에서 파일스트림을 불러오지 못합니다..? #24

Closed IntelPentium0 closed 1 year ago

IntelPentium0 commented 1 year ago

Screenshot_20230828-002135_StarLight

메신저봇에서는 잘만 작동되던 소스가 별빛에서 갑자기 작동을 멈춰서 발번역을 했는데 파일스트림을 못하는거 같더라구요...

그래서 메신저봇에서 따로 똑같이 만들어서 해봤는데... 메신저봇은 파일스트림으로 데이터 생성을 해내더라구요...

그래서 버그로 의심이 된다고 판단해서 올려봅니다...

해당 영상

------해당 소스코드입니다..

var path = "/sdcard/Botdata/check/"; function response(room, msg, sender, isGroupChat, replier, imageDB, packageName) { var command = msg.split(" ")[0]; var nick = msg.split(" ")[1]; var rank = ""; var pass = FileStream.read(path + "dailycheck.txt"); if (msg == "야식묵자" && sender == "방장봇") { FileStream.remove(path + "dailycheck.txt"); FileStream.remove(path + "dailyrank.txt"); FileStream.write(path + "dailycheck.txt"); FileStream.write(path + "dailyrank.txt", 1); replier.reply("[SYSTEM]" + "\n출석체크가 리셋되었습니다."); } if (command == "/ㅊㅊ" || command == "/출첵" || command == "/출석체크") { pass = FileStream.read(path + "dailycheck.txt"); if (pass.includes(sender) == true||pass==null) { replier.reply("[SYSTEM]\n" + "이미 출석체크 하셨습니다."); } else { rank = FileStream.read(path + "dailyrank.txt"); FileStream.append(path + "dailycheck.txt", "\n" + rank + "등: " + sender); replier.reply("[SYSTEM]" + "\n" + sender + "님이 출석체크를 하셨습니다!"); rank = +rank + 1; FileStream.remove(path + "dailyrank.txt"); FileStream.write(path + "dailyrank.txt", rank); } } if (command == "/출석장부") { pass = FileStream.read(path + "dailycheck.txt"); if (pass == "") { replier.reply("[SYSTEM]\n아직 출석체크를 한 사람이 없습니다."); } else { replier.reply("--오늘의 출석명부--\n" + pass); } } }

mooner1022 commented 1 year ago

아마 정황상 따로 수정하던 코드가 일전의 버그 수정 후 배포된 앱에 섞여 들어간 것 같습니다. 빌드만 다시 해서 배포하겠습니다.

mooner1022 commented 1 year ago

재빌드본으로 다시 테스트 부탁드립니다.

IntelPentium0 commented 1 year ago

https://quickshare.samsungcloud.com/vqqoPxCkjdrX

해결 완료되었습니다!

수고하셨습니다!