Eli Soli
Eli Soli
Explore posts from servers
CC#
Created by Eli Soli on 1/1/2025 in #help
Named Pipes Connection
Hey everybody! I'm trying to support Windows in a project and I'm trying to connected to the Discord named pipe (an IPC server) that runs on Windows when the Discord client is open. So far I did this (and a bit more but this is not the point):
var pipe = new NamedPipeClientStream(
@"\\.\pipe\discord-ipc-0",
@"discord-ipc-0",
PipeDirection.InOut,
PipeOptions.None,
TokenImpersonationLevel.Impersonation
);

Console.WriteLine("Connecting...");
try { pipe.Connect(); }
catch (Exception e) {
Console.WriteLine("Not connected");
return (false, e.Message);
}

Console.WriteLine("Connected");
var pipe = new NamedPipeClientStream(
@"\\.\pipe\discord-ipc-0",
@"discord-ipc-0",
PipeDirection.InOut,
PipeOptions.None,
TokenImpersonationLevel.Impersonation
);

Console.WriteLine("Connecting...");
try { pipe.Connect(); }
catch (Exception e) {
Console.WriteLine("Not connected");
return (false, e.Message);
}

Console.WriteLine("Connected");
My issue is first two params of NamedPipeClientStream, I haven't find what I should put there or show it should look, the .Net documentation about this class is not very explanatory. So in this state it catches The specified path is invalid but if I change the first param to @".\pipe" the program gets stuck in pipe.Connect() (but it is still possible to quit with ^C). If anybody knows how to do this please help :) I'm a Linux femboy, not a windows pro
9 replies
DIAdiscord.js - Imagine an app
Created by Eli Soli on 9/27/2024 in #djs-questions
ClientUser.setActivity
Hello everybody! I'm trying to implement in my project the feature that allows the user to show a presence on Discord just using their authentication token. For it I'm using the modified Discord.js script provided at https://github.com/seia-soto/chrome-discord-presence. My question is how can I use https://discord.js.org/docs/packages/discord.js/14.16.2/ClientUser:Class#setActivity to show a presence as customized as https://github.com/pandasoli/nekovim/raw/master/docs/final-preview.gif ? The documentation of ClientUser.setActivity doesn't say anything about changing the images. PS: The script works and as far as I tested all the features currently described in the documentation of ClientUser.setActivity work.
10 replies
CC#
Created by Eli Soli on 8/20/2024 in #help
Git licensing question
Hi people. Changing the license of my repository also applies the new license's terms to old commits? If not, is there any way I can "add the new license to old commits"?
10 replies
DIAdiscord.js - Imagine an app
Created by Eli Soli on 3/8/2024 in #djs-questions
Set activity with user ID
Hello everybody. I'm coding something related to Discord presence. And I already created a full design for the project but I heard about Discord.js being able to set an activity just with the user's ID. So I decided to ask the experts if this is true before driving into Discord.js for weeks just to check this.
5 replies
CC#
Created by Eli Soli on 1/3/2023 in #help
❔ Oo instead of slash after execute `dotnet run`
Guys, when I press Fn + 0 it makes a /, but after I run dotnet run if I press it again, Oo appears. I'm using Linux. The default terminal, and the output is UTF-8. And the keyboard language is ok, nothing changed. What could be going on?
2 replies