Skip to content

Commit

Permalink
Merge pull request #159 from nick22985/extraDebug
Browse files Browse the repository at this point in the history
devops: Added extra debug for issue: #145
  • Loading branch information
xhayper committed Dec 2, 2022
2 parents 71e57f1 + f5a18c1 commit e7de56f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ export class RPCController {

async login() {
const { clientId } = getApplicationId(getConfig());
logInfo("[004] Debug:", 'Logging in with client ID "' + clientId + '"');
logInfo("[004] Debug:", "Login - isConnected", this.client.isConnected, "isReady", this.client.clientId);
logInfo("[004] Debug:", `login - ${this.client}`);

if (this.client.isConnected && this.client.clientId === clientId) return;

Expand Down Expand Up @@ -191,9 +194,15 @@ export class RPCController {
}

async enable() {
logInfo("[004] Debug:", "Enabling Discord Rich Presence");

this.enabled = true;

await this.login();
logInfo("[004] Debug:", "Client Should be logged in");
logInfo("[004] Debug:", `enable - ${this.client}`);

logInfo("[004] Debug:", "Enabled - isConnected", this.client.isConnected, "isReady", this.client.clientId);
await this.sendActivity();
this.cleanUp();
this.listen();
Expand Down

0 comments on commit e7de56f

Please sign in to comment.