C
C#2y ago
Nikolaaa

keyword this is not valid in a static property

what do i put here instead of this. ?
2 Replies
Nikolaaa
Nikolaaa2y ago
this.handlers = default(DiscordRpc.EventHandlers);
DiscordRpc.Initialize("BOT ID", ref this.handlers, true, null);
this.handlers = default(DiscordRpc.EventHandlers);
DiscordRpc.Initialize("BOT ID", ref this.handlers, true, null);
this.presence.details = "Text 1";
this.presence.state = "Text 2";
this.presence.largeImageKey = "image";
this.presence.smallImageKey = "image";
DiscordRpc.UpdatePresence(ref this.presence);
this.handlers = default(DiscordRpc.EventHandlers);
DiscordRpc.Initialize("BOT ID", ref this.handlers, true, null);
this.handlers = default(DiscordRpc.EventHandlers);
DiscordRpc.Initialize("BOT ID", ref this.handlers, true, null);
this.presence.details = "Text 1";
this.presence.state = "Text 2";
this.presence.largeImageKey = "image";
this.presence.smallImageKey = "image";
DiscordRpc.UpdatePresence(ref this.presence);
also how do I put a namespace and a class in a c# console because I just cant its not working as it worked in winforms Fixed i managed to make a class "program" and put it in there it took some time tho
TheBoxyBear
TheBoxyBear2y ago
You can make the class its own file to separate it from Program If it's meant to be in Program, just remote this
Want results from more Discord servers?
Add your server
More Posts