Snazzah / SublimeDiscordRP

📄 Discord rich presence for Sublime Text
MIT License
133 stars 35 forks source link

Files opened as C don't work with SublimeDiscordRP #18

Closed Slattz closed 6 years ago

Slattz commented 6 years ago

Hi, I'm experiencing a problem. Any files that I have marked in Sublime as the C Language don't show up in Discord, such as .c & .h. They don't appear on Discord unless I specify their language as C++ in the Open all with current extension as... drop-down but that's not very practical. Thanks for this plugin btw, apart from this issue, it's awesome 🙂

FichteFoll commented 6 years ago

I confirmed that the detection works properly. My guess is that the lang-c icon doesn't exist, although it was contained within the icon map before, and Discord just ignores the update with that icon entirely.

@Snazzah could you please take a look at the registered icons? Or give me the required credentials for the discord icon upload so I can check myself?

Snazzah commented 6 years ago

@FichteFoll screen shot 2018-01-23 at 3 10 32 pm

Snazzah commented 6 years ago

also @Slattz you can do Ctrl-Shift-I to check Discord console, start Sublime, then paste what console says in the issue.

Slattz commented 6 years ago

@Snazzah Here's everything in the console after clearing it then opening Sublime:


2bb35e4….js:17 [RunningGameStore] games []
2bb35e4….js:17 [RPCServer:IPC] Socket Opened: 3
2bb35e4….js:17 [RPCServer:IPC] Socket Emit: 3 Object {cmd: "DISPATCH", data: Object, evt: "READY", nonce: null}
2bb35e4….js:17 [RPCServer:IPC] Socket Message: 3 Object {args: Object, cmd: "SET_ACTIVITY", nonce: "10f47560-54c0-4825-96b8-7eca743dfeb2"}
2bb35e4….js:17 [RPCServer:IPC] Socket Emit: 3 Object {cmd: "SET_ACTIVITY", data: Object, evt: null, nonce: "10f47560-54c0-4825-96b8-7eca743dfeb2"}cmd: "SET_ACTIVITY"data: Objectevt: nullnonce: "10f47560-54c0-4825-96b8-7eca743dfeb2"__proto__: Object
2bb35e4….js:17 [RunningGameStore] games [Object]
2bb35e4….js:17 [RPCServer:IPC] Socket Message: 3 Object {args: Object, cmd: "SET_ACTIVITY", nonce: "a6894a18-3a17-49f3-b318-4bc325dc3018"}
2bb35e4….js:17 [RPCServer:IPC] Socket Emit: 3 Object {cmd: "SET_ACTIVITY", data: Object, evt: "ERROR", nonce: "a6894a18-3a17-49f3-b318-4bc325dc3018"}
Snazzah commented 6 years ago

@slattz can you open the data object in the last line?

Slattz commented 6 years ago

@Snazzah I couldn't copy and paste it so I took a pic, here you go. a

Snazzah commented 6 years ago

Fixed in cd65795.

FichteFoll commented 6 years ago

Good to know that discord renders these errors in its console. I would have set up some reading for the IPC, but since all I/O is blocking it would probably need a separate thread and then I just didn't consider it worth it anymore. I also didn't know whether a reply was guaranteed.