Skip to content

Commit

Permalink
Fix DiscordRPC
Browse files Browse the repository at this point in the history
  • Loading branch information
OrigamingWasTaken committed Oct 18, 2024
1 parent 84f5772 commit d9adb8d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async function gameJoiningEntry(data: GameEventInfo) {
rpcOptions.buttonUrl2 = undefined;
}

await RPCController.set(rpcOptions);
RPCController.set(rpcOptions);
}

export default gameJoiningEntry;
11 changes: 9 additions & 2 deletions frontend/src/windows/main/ts/roblox/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,15 @@ export class RobloxInstance {
await sleep(3000);

// Read the first content to not miss anything (We use iconv to make sure there is no non-UTF8 chars)
// await shell(`iconv -f utf-8 -t utf-8 -c "${this.latestLogPath}" > /tmp/roblox_ablox.log`, [], { completeCommand: true });
// const content = (await shell('cat', ['/tmp/roblox_ablox.log'])).stdOut.trim();
shell(`iconv -f utf-8 -t utf-8 -c "${this.latestLogPath}" > /tmp/roblox_ablox.log`, [], { completeCommand: true }).then(
() => {
console.info('[Roblox.Instance] Converted first logs content');
shell('cat', ['/tmp/roblox_ablox.log']).then((result) => {
console.info('[Roblox.Instance] Processing first logs content');
this.processLines(result.stdOut.trim().split('\n'));
});
}
);

let lastNotificationTime: null | number = null; // Store the UNIX time at which the last errror notification was created, to prevent spam
const stdOutHandler = async (data: string) => {
Expand Down

0 comments on commit d9adb8d

Please sign in to comment.