Skip to content

Commit

Permalink
Added reconnect command, and new language support
Browse files Browse the repository at this point in the history
  • Loading branch information
maxerbox committed Dec 4, 2017
1 parent a9f99cb commit c3ef3e1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function activate (context) {
contextSave = context
configuration = vscode.workspace.getConfiguration('discord')
console.log(process.version)
context.subscriptions.push(vscode.commands.registerCommand('discord.updatePresence', updatePresence), vscode.commands.registerCommand('discord.enable', enable), vscode.commands.registerCommand('discord.disable', disable))
context.subscriptions.push(vscode.commands.registerCommand('discord.updatePresence', updatePresence), vscode.commands.registerCommand('discord.enable', enable), vscode.commands.registerCommand('discord.disable', disable), vscode.commands.registerCommand('discord.reconnect', reconnectHandle))

This comment has been minimized.

Copy link
@maxerbox

maxerbox Dec 4, 2017

Author Owner

Added a new command called reconnect
#21

if (!configuration.enable) return
/* if (process.platform === 'win32') {
var discordRegister = new DiscordRegisterWin(configuration.clientID, VSCODE_PATH)
Expand All @@ -28,7 +28,11 @@ function activate (context) {
} else */
startClient()
}
function reconnectHandle () {
startClient()
}
function startClient () {
client = null
client = new DisposableClient({ transport: 'ipc' })
contextSave.subscriptions.push(client)
// Use the console to output diagnostic information (console.log) and errors (console.error)
Expand Down
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-discord",
"displayName": "vscode-discord",
"description": "Display your current project on vscode in discord with Rich Presence",
"version": "1.0.1",
"version": "1.0.2",
"publisher": "maxerbox",
"engines": {
"vscode": "^1.18.0"
Expand Down Expand Up @@ -30,6 +30,11 @@
"command": "discord.disable",
"title": "Disable vscode discord in the current workspace",
"category": "Discord"
},
{
"command": "discord.reconnect",
"title": "Reconnect to the discord ipc socket",
"category": "Discord"
}
],
"configuration": [
Expand Down Expand Up @@ -98,9 +103,12 @@
".json": "json",
".md": "markdown",
".py": "python",
"package.json": "npm"
"package.json": "npm",
".ts": "typescript",
".lua": "lua",

This comment has been minimized.

Copy link
@maxerbox

maxerbox Dec 4, 2017

Author Owner

#20

".vue": "vue"

This comment has been minimized.

Copy link
@maxerbox

maxerbox Dec 4, 2017

Author Owner

#18

},
"description": "THe icon map for the extensions"
"description": "THe icon map for the extension"
},
"discord.interval": {
"type": "int",
Expand Down

0 comments on commit c3ef3e1

Please sign in to comment.