Giter Site home page Giter Site logo

icrawl / discord-vscode Goto Github PK

View Code? Open in Web Editor NEW
1.2K 7.0 1.6K 3.7 MB

๐Ÿ–‹๏ธ Update your discord status with a rich presence

Home Page: https://marketplace.visualstudio.com/items?itemName=icrawl.discord-vscode

License: MIT License

TypeScript 94.80% JavaScript 5.20%
vscode vscode-extension discord discord-presence discord-status

discord-vscode's Introduction

Discord Presence

Update your discord status with a rich presence.

Features

  • Shows what you are editing in VSCode
  • Support for over 140 of the most popular languages
  • Enable/Disable Rich Presence for individual workspaces (enabled by default)
  • Custom string support
  • Stable or Insiders build detection
  • Debug mode detection
  • Easily manually reconnect to Discord

Troubleshooting

Windows: Do not run your VSCode or Discord as admin, there is no reason to and it just further complicates everything down the line.

Linux: Discord versions installed using flatpak or snap need modifications in order to support IPC. In order to avoid this (and as Discord itself suggests) you should download it from discord.com

References:
flathub/com.discordapp.Discord#29
#77 (comment)
#85 (comment)

Contributing

  1. Fork the repository!
  2. Clone your fork: git clone https://github.com/your-username/discord-vscode.git
  3. Create your feature branch: git checkout -b my-new-feature
  4. Commit your changes: git commit -am 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request :D

Author

Discord Presence ยฉ iCrawl.
Authored and maintained by iCrawl.

GitHub @iCrawl

discord-vscode's People

Contributors

aiden01 avatar awesomeobserver avatar berwyn avatar bocanada avatar chakany avatar cyberboss avatar dependabot-preview[bot] avatar dependabot[bot] avatar detectedstorm avatar dusterthefirst avatar etjeanmachine avatar fog-yamato avatar hexadecimaldinosaur avatar icrawl avatar imfunniee avatar julienzd avatar kshxtij avatar latipun7 avatar oskikiboy avatar pyrox18 avatar renovate[bot] avatar sadmuphin avatar sasch-a avatar sblaplace avatar smokes avatar spicydonuts avatar strafe avatar vccortez avatar vladfrangu avatar xetera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-vscode's Issues

[Feature Request] Ability to customize what to be show

In most cases, it a-okay to show all the information that is related to the current project I'm working on, but sometimes I might switch to some project is more likely to be a closed source project, but I still want to ability to tell someone that I'm actually paying my hard work and dedication to the project, a good way to do so is via this lovely VSCode plugin and all I want is to eliminate some of the more sensitive information like the file name

"Editing a LUA file"

I can't find the code at fault, but I see Lua is capitalised in the rich preview:

"Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!
https://www.lua.org/about.html

Option to default to disabled on new workspaces

Hey, great work. For privacy reasons, I think it would be great to have an option to have rich presence be disabled by default on new workspaces, unless you explicitly enable it for them.

[Request] Preference to disable Workspace name

As stated in my last request, loving the Extension, keep up the great work! I've got a few more requests to make this Extension even better, I'll keep them in seperate Issues as they are all seperate features.

This Preference would be useful when you are working on a private/unannounced Project that you wouldn't want other users to see. Sort of niche, I know, but it'd be appreciated to have.

Note, setting the Workspace Name prefs to blank return an error

[icrawl.discord-vscode]4000 child "activity" fails because [child "state" fails because ["state" is not allowed to be empty]]

Error [RPC_CLIENT_ERROR]: 4000 child "activity" fails because [child "state" fails because ["state" is not allowed to be empty]]

so that is not a solution. You can paste in Non-Breaking Spaces, but that's not a very elegant solution, would be best to just get this preference.

Rich Presence Images Missing

Just noticed this today. Fresh installing the Extension and restarting Discord does not solve the issue.

  • Latest Discord (Canary)
  • Latest VSCode + Extension (Stable)
  • Latest Win10 x64

image

EDIT: This may be due to API Issues. Will close the issue if that's the case.

No Discord Client Detected

  • Windows 10 x64 1803 17134.112
  • Visual Studio Code 1.24.1
  • Discord Canary Build 18051

image

This issue has persisted for 4 days now (since Wednesday, June 27th). I've open/closed Discord & VSCode, Reinstalled the Extension, Disable/Enabled the Extension, Restarted Windows, and Cleared all temporary files, to no avail.

Pressing the Reconnect to Discord button produces the following notifications...

image

Any help would be appreciated.

Extension disfunctionning with C files

Hey there !
I've got a lil' problem to make this extension working with the C language on VSCode.
I'm on discord Canary & Fedora 26.

All of my .c projects are showing as "Idling" for Discord.
Works really good with every other language I tried ๐Ÿ‘

Also, when switching to a working file (like settings.json) , when I go back to my C project it shows that I'm always editing my settings !

2017-12-09-150226_1920x1080_scrot

Not sure how to use?

Could you explain how to install and set-up more in the README.md because I am really confused on how to install.

Doesn't work.

I tryed a lot if things and stay without work, reloading, reinstalling etc. Help me

RPC Timeout

For some reason, every time I try to use it, it keeps giving me this error:

image

Can't connect to discord via RPC

I've been getting this error and can't seem to locate a source. I'm running VS Code v1.17.2 on the latest build of Windows 10. Not sure if it matters but I do have PFSense handling my routing.

Couldn't connect to discord via rpc: connect EPERM \?\pipe\discord-ipc-0

Option to hide workspace when no workspace found

I cannot get "{null}" working for discord.lowerDetailsNotFound. Is it possible to add the ability to not show the workspace that to that property? I saw some of the previous closed issues which include it for other properties. I just want an empty line if there is no workspace found.

Error Notification

Can we have it so that when "Discord" is not open, or I do not have internet, that it does not show this error message? I find it to be really annoying (the RPC cannnot connect). If it is better, aside from where it is detected to be open and you hvave internet, then the error message can be shown. Otherwise, maybe a log message in the little bar at the botom.

Could not connect - Ubuntu 17.10

Operating System: Ubuntu 17.10
Discord: 0.0.4
Visual Studio Code: 1.20.0

Error: Couldn't connect to Discord via RPC:

I do not see any mentions making it non-compatible with Linux, and having used this on my Windows machine, it's a great tool to have. Unfortunately, it doesn't work on my laptop running Ubuntu 17.10 which is where I do the bulk of my code ๐Ÿ˜ฆ

'No Discord Client detected!' even when Discord is open.

I've tried reinstalling this extension, but every time on startup it says that there is no client detected. I've added VS Code as a game in Discord and ensured that the option to display the running game is on.

Is there anything else I should try? Here's a screenshot showing the error with the Discord client next to it.
https://vgy.me/jHLrCE.png

[Request/Question] Ability to Change elapsed time to total time inside vscode instead of per file

Hey,

The title pretty much sums up what I want to ask,
Is it possible to change it so that it counts the amount of time you have spent in vscode per session instead of the time elapsed per file in vscode (i.e disable the time update when you change file but keep the file/state name update).

I'm not asking for this to be changed for everyone just if its possible for myself to change it.

Thank you

Suggestion on file language detection

Currently this extension detect languages by itself with filename, but simply get it from window.activeTextEditor.document.languageId may be better. This also makes it possible to display correct language icon for matlab .m file and objective-c .m file, if user select correct language for themselves.

Also, there may be sub-type of files besides language, we can detect by the extension itself after get the languageId.

[Bug?] Potential Memory Leak upon Enabling/Disabling the Extension in VSCode while Spotify Rich Presence is active in Discord

I've not yet been able to confirm this, though this is the second time it has happened so I was curious if anyone else has experienced or can reproduce the issue?

Below are the actions I have taken each time this has happened:

  • Open Task Manager (for monitoring RAM Usage)
  • Open Discord
  • Disable the VSCode Extension
  • Reload VSCode
  • Open Spotify, begin playing Music (make sure you have Spotify Rich Presence setup)
  • Re-Enable the VSCode Extension
  • Reload VSCode

If this repro works, VSCode will not re-open and your RAM usage will quickly jump to 100%, freezing your computer until you force shutdown. As stated, this is the second time this has happened to me. I'm not sure if this is a Bug on the Extension's end, Spotify's end, or Discord's end.

System Specs:

  • Windows 10 (Latest Update)
  • VSCode Stable Channel (Latest Update)
  • Discord Canary (Latest Update)
  • Spotify Desktop App (Latest Update)
  • Discord-VSCode Extension (Latest Update)
  • 12GB RAM

I frequently toggle this Extension off and on when I'd rather display my Spotify presence than VSCode Presence, which is why I've come across this issue. It'd be nice if there was a way to toggle the Extension's connection to Discord off and on without having to Reload VSCode each time.

Discord Presence breaks if Discord is restarted and VSCode restart attempts empty

So, I've noticed this weird bug with Discord Presence. (or discord-rpc, one of the two).

The easiest steps to reproduce this is:

  • Launch Discord
  • Launch VSCode
  • Close Discord
  • In VSCode, wait till all the errors from IPC connections end (no more popups saying cannot connect to IPC)
  • Restart Discord
  • Run the Enable Discord Presence Command

What should happen

Everyone is a good boi and resume the rich presence

What happens

Someone isn't a good boi and well, breaks.

Status stays after leaving VSC

After closing VSC the status disappears and all the info this extension gives disappears, which is obviously as designed, but then the status "playing: visual studio code" comes back.

So, i'm standing here with VSC closed and it still says i'm using it.

Request to use workspace project icon for largeImageKey

For example, when working on my personal bot, I have an icon.png file that's the default icon for the project, when editing that workspace, I'd love to have that icon be displayed as the largeImageKey. Another example would be when I forked the discord-vscode repo, there was an Icon.png that would've looked great as the largeImageKey.

I tried adding something myself but I'm not too familiar with TypeScript yet so I know I butchered the specifics. I looked into the setActivity() function and tried to tinker with some stuff on my own fork that ended up looking something like this gist.

I know there's gotta be a better way to do it but I just stumbled upon this project and love what it can do so it'll take me some time to get acquainted with TypeScript so I can be more useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.