From f989319bd2f451d85caf3949432f86090a3ea8ed Mon Sep 17 00:00:00 2001 From: Crawl Date: Tue, 3 Jul 2018 04:45:24 +0200 Subject: [PATCH] fix: login now uses an object instead of parameters --- src/extension.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index b6e529a..069d55e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -46,6 +46,7 @@ let statusBarIcon: StatusBarItem; // `Activate` is fired when the extension is enabled. This SHOULD only fire once. export function activate(context: ExtensionContext) { + console.log('[Discord Presence]: Activated!'); // Get the workspace's configuration for "discord". config = workspace.getConfiguration('discord'); @@ -97,6 +98,7 @@ function initRPC(clientID: string, loud?: boolean): void { // Once the RPC Client is ready, set the activity. rpc.once('ready', () => { + console.log('[Discord Presence]: Successfully connected to Discord'); // Announce the reconnection if (loud && !config.get('silent')) window.showInformationMessage('Successfully reconnected to Discord RPC'); @@ -142,8 +144,9 @@ function initRPC(clientID: string, loud?: boolean): void { }); // Log in to the RPC Client, and check whether or not it errors. - rpc.login(clientID).catch(async error => { + rpc.login({ clientId: clientID }).catch(async error => { // Check if the client is reconnecting + console.error(`[Discord Presence]: ${error}`); if (reconnecting) { // Destroy and dispose of everything after the set reconnect attempts if (reconnectCounter >= config.get('reconnectThreshold')) {