diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/Control_Discord.xaml b/Project-Aurora/Project-Aurora/Profiles/Discord/Control_Discord.xaml
new file mode 100644
index 000000000..e024801a3
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/Control_Discord.xaml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/Control_Discord.xaml.cs b/Project-Aurora/Project-Aurora/Profiles/Discord/Control_Discord.xaml.cs
new file mode 100644
index 000000000..48ea5eeb4
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/Control_Discord.xaml.cs
@@ -0,0 +1,105 @@
+using Aurora.Profiles.Discord.GSI;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Net.Http;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+
+using System.IO;
+
+namespace Aurora.Profiles.Discord
+{
+ ///
+ /// Interaction logic for Control_Minecraft.xaml
+ ///
+ public partial class Control_Discord : UserControl {
+
+ private Application profile;
+
+ public Control_Discord(Application profile) {
+ this.profile = profile;
+
+ InitializeComponent();
+ SetSettings();
+
+
+ profile.ProfileChanged += (sender, e) => SetSettings();
+ }
+
+ private void SetSettings() {
+ GameEnabled.IsChecked = profile.Settings.IsEnabled;
+ }
+
+ private void GameEnabled_Checked(object sender, RoutedEventArgs e) {
+ if (IsLoaded) {
+ profile.Settings.IsEnabled = GameEnabled.IsChecked ?? false;
+ profile.SaveProfiles();
+ }
+ }
+
+ private void PatchButton_Click(object sender, RoutedEventArgs e)
+ {
+ InstallPlugin();
+ }
+
+ private void UnpatchButton_Click(object sender, RoutedEventArgs e)
+ {
+ UninstallPlugin();
+ }
+
+ private void InstallPlugin()
+ {
+ string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
+ string pluginDirectory = Path.Combine(appdata, "BetterDiscord", "plugins");
+
+ if (!Directory.Exists(pluginDirectory))
+ Directory.CreateDirectory(pluginDirectory);
+
+ string pluginFile = Path.Combine(pluginDirectory, "AuroraGSI.plugin.js");
+ if (File.Exists(pluginFile))
+ {
+ MessageBox.Show("Plugin already installed");
+ return;
+ }
+
+ try
+ {
+ using (FileStream pluginStream = File.Create(pluginFile))
+ {
+ pluginStream.Write(Properties.Resources.DiscordGSIPlugin, 0, Properties.Resources.DiscordGSIPlugin.Length);
+ }
+ MessageBox.Show("Plugin installed successfully");
+ }
+ catch (Exception e)
+ {
+ MessageBox.Show("Error installng plugin: " + e.Message);
+ }
+ }
+
+ private void UninstallPlugin()
+ {
+ string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
+ string path = Path.Combine(appdata, "BetterDiscord", "plugins", "AuroraGSI.plugin.js");
+
+ if (File.Exists(path))
+ {
+ File.Delete(path);
+ MessageBox.Show("Plugin uninstalled successfully");
+ return;
+ }
+ else
+ {
+ MessageBox.Show("Plugin not found.");
+ return;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/DiscordApplication.cs b/Project-Aurora/Project-Aurora/Profiles/Discord/DiscordApplication.cs
new file mode 100644
index 000000000..3fb3bdbc9
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/DiscordApplication.cs
@@ -0,0 +1,26 @@
+using Aurora.Profiles.Minecraft.Layers;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aurora.Profiles.Discord
+{
+
+ public class Discord : Application {
+
+ public Discord() : base(new LightEventConfig
+ {
+ Name = "Discord",
+ ID = "discord",
+ ProcessNames = new[] { "Discord.exe", "DiscordPTB.exe", "DiscordCanary.exe" },
+ ProfileType = typeof(DiscordProfile),
+ OverviewControlType = typeof(Control_Discord),
+ GameStateType = typeof(GSI.GameState_Discord),
+ Event = new GameEvent_Generic(),
+ IconURI = "Resources/betterdiscord.png",
+ EnableByDefault = false
+ }) { }
+ }
+}
diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/DiscordProfile.cs b/Project-Aurora/Project-Aurora/Profiles/Discord/DiscordProfile.cs
new file mode 100644
index 000000000..bb7e961a0
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/DiscordProfile.cs
@@ -0,0 +1,67 @@
+using Aurora.Devices;
+using Aurora.EffectsEngine.Animations;
+using Aurora.Profiles.Minecraft.Layers;
+using Aurora.Settings;
+using Aurora.Settings.Layers;
+using Aurora.Settings.Overrides;
+using Aurora.Settings.Overrides.Logic;
+using Aurora.Settings.Overrides.Logic.Builder;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aurora.Profiles.Discord {
+
+ public class DiscordProfile : ApplicationProfile {
+
+ public DiscordProfile() : base() { }
+
+ public override void Reset() {
+ base.Reset();
+
+ OverlayLayers = new System.Collections.ObjectModel.ObservableCollection()
+ {
+ new Layer("Mic Mute", new SolidColorLayerHandler()
+ {
+ Properties = new LayerHandlerProperties()
+ {
+ _PrimaryColor = Color.Red,
+ _Sequence = new KeySequence(new DeviceKeys[] { DeviceKeys.F1, DeviceKeys.F2, DeviceKeys.F3, DeviceKeys.F4 })
+ }
+ }, new OverrideLogicBuilder().SetDynamicBoolean("_Enabled", new BooleanGSIBoolean("User/SelfMute"))),
+
+ new Layer("Deafen", new SolidColorLayerHandler()
+ {
+ Properties = new LayerHandlerProperties()
+ {
+ _PrimaryColor = Color.LimeGreen,
+ _Sequence = new KeySequence(new DeviceKeys[] { DeviceKeys.F5, DeviceKeys.F6, DeviceKeys.F7, DeviceKeys.F8 })
+ }
+ }, new OverrideLogicBuilder().SetDynamicBoolean("_Enabled", new BooleanGSIBoolean("User/SelfDeafen"))),
+
+ new Layer("Mentions", new SolidColorLayerHandler()
+ {
+ Properties = new LayerHandlerProperties()
+ {
+ _PrimaryColor = Color.Yellow,
+ _Sequence = new KeySequence(new DeviceKeys[] { DeviceKeys.F9, DeviceKeys.F10, DeviceKeys.F11, DeviceKeys.F12 })
+ }
+ }, new OverrideLogicBuilder().SetDynamicBoolean("_Enabled", new BooleanGSIBoolean("User/Mentions"))),
+
+ new Layer("Unread Messages", new SolidColorLayerHandler()
+ {
+ Properties = new LayerHandlerProperties()
+ {
+ _PrimaryColor = Color.LightBlue,
+ _Sequence = new KeySequence(new DeviceKeys[] { DeviceKeys.PRINT_SCREEN, DeviceKeys.SCROLL_LOCK, DeviceKeys.PAUSE_BREAK })
+ }
+ }, new OverrideLogicBuilder().SetDynamicBoolean("_Enabled", new BooleanGSIBoolean("User/UnreadMessages"))),
+
+
+ };
+ }
+ }
+}
diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/AuroraGSI.plugin.js b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/AuroraGSI.plugin.js
new file mode 100644
index 000000000..dff6e2e20
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/AuroraGSI.plugin.js
@@ -0,0 +1,248 @@
+//META{"name":"AuroraGSI","website":"http://www.project-aurora.com/","source":"https://github.com/Popat0/Discord-GSI/blob/master/AuroraGSI.plugin.js"}*//
+
+/*@cc_on
+@if (@_jscript)
+
+ // Offer to self-install for clueless users that try to run this directly.
+ var shell = WScript.CreateObject("WScript.Shell");
+ var fs = new ActiveXObject("Scripting.FileSystemObject");
+ var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\BetterDiscord\plugins");
+ var pathSelf = WScript.ScriptFullName;
+ // Put the user at ease by addressing them in the first person
+ shell.Popup("It looks like you've mistakenly tried to run me directly. \n(Don't do that!)", 0, "I'm a plugin for BetterDiscord", 0x30);
+ if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
+ shell.Popup("I'm in the correct folder already.", 0, "I'm already installed", 0x40);
+ } else if (!fs.FolderExists(pathPlugins)) {
+ shell.Popup("I can't find the BetterDiscord plugins folder.\nAre you sure it's even installed?", 0, "Can't install myself", 0x10);
+ } else if (shell.Popup("Should I copy myself to BetterDiscord's plugins folder for you?", 0, "Do you need some help?", 0x34) === 6) {
+ fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true);
+ // Show the user where to put plugins in the future
+ shell.Exec("explorer " + pathPlugins);
+ shell.Popup("I'm installed!", 0, "Successfully installed", 0x40);
+ }
+ WScript.Quit();
+
+@else@*/
+
+class AuroraGSI {
+
+ getName() { return "AuroraGSI"; }
+ getDescription() { return "Sends information to Aurora about users connecting to/disconnecting from, mute/deafen status"; }
+ getVersion() { return "1.1"; }
+ getAuthor() { return "Popato & DrMeteor"; }
+ getChanges() {
+ return {
+ "1.0.0" :
+ `
+ Initial version.
+ `,
+ "1.0.1" :
+ `
+ Added conditions for only reacting to local user.
+ `,
+ "1.0.2" :
+ `
+ Removed isBeingCalled.
+ Removed redundant loop.
+ `,
+ "1.0.3" :
+ `
+ Updated the CDN for the library.
+ `,
+ "1.1" :
+ `
+ Made the state only be sent if it changed.
+ `
+ };
+ }
+
+ constructor(){
+ this.json = {
+ "provider": {
+ "name": "discord",
+ "appid": -1
+ },
+ "user":{
+ "id": -1,
+ "status": "undefined",
+ "self_mute": false,
+ "self_deafen" : false,
+ "mentions": false,
+ "unread_messages": false,
+ "being_called": false
+ },
+ "guild": {
+ "id": -1,
+ "name": "",
+ },
+ "text": {
+ "id": -1,
+ "type": -1,
+ "name": "",
+ },
+ "voice": {
+ "id": -1,
+ "type": -1,
+ "name": "",
+ }
+ }
+ this.lastJson;
+ }
+
+ load() {}//legacy
+
+ start() {
+ let libLoadedEvent = () => {
+ try{ this.onLibLoaded(); }
+ catch(err) { console.error(this.getName(), "fatal error, plugin could not be started!", err); }
+ };
+
+ let lib = document.getElementById("NeatoBurritoLibrary");
+ if(lib == undefined) {
+ lib = document.createElement("script");
+ lib.setAttribute("id", "NeatoBurritoLibrary");
+ lib.setAttribute("type", "text/javascript");
+ lib.setAttribute("src", "https://raw.githack.com/Popat0/Discord-GSI/master/NeatoBurritoLibrary.js");
+ document.head.appendChild(lib);
+ }
+ if(typeof window.Metalloriff !== "undefined") libLoadedEvent();
+ else lib.addEventListener("load", libLoadedEvent);
+ }
+
+ stop() {
+ clearInterval(this.updatetimer);
+ //this.unpatch();
+ this.ready = false;
+ }
+
+ onLibLoaded() {
+
+ this.settings = NeatoLib.Settings.load(this, this.defaultSettings);
+ NeatoLib.Updates.check(this, "https://raw.githubusercontent.com/Popat0/Discord-GSI/master/AuroraGSI.plugin.js");
+
+ if(this.settings.displayUpdateNotes) NeatoLib.Changelog.compareVersions(this.getName(), this.getChanges());
+
+ let getVoiceStates = NeatoLib.Modules.get(["getVoiceState"]).getVoiceStates,
+ getUser = NeatoLib.Modules.get(["getUser"]).getUser,
+ getChannel = NeatoLib.Modules.get(["getChannel"]).getChannel;
+
+ // this.jsonTimer = setInterval( this.sendJsonToAurora, 50, this.json );
+
+ this.updatetimer = setInterval(() => {
+ var self = this;
+
+ var guild = NeatoLib.getSelectedGuild();
+ var localUser = NeatoLib.getLocalUser();
+ var localStatus = NeatoLib.getLocalStatus();
+ var textChannel = NeatoLib.getSelectedTextChannel();
+ var voiceChannel = NeatoLib.getSelectedVoiceChannel();
+ if (voiceChannel)
+ var voiceStates = getVoiceStates(voiceChannel.guild_id);
+
+ if(localUser && localStatus){
+ self.json.user.id = localUser.id;
+ self.json.user.status = localStatus;
+ }
+ else {
+ self.json.user.id = -1;
+ self.json.user.status = "";
+ }
+
+ if(guild) {
+ self.json.guild.id = guild.id;
+ self.json.guild.name = guild.name;
+ }
+ else {
+ self.json.guild.id = -1;
+ self.json.guild.name = "";
+ }
+
+ if(textChannel){
+ self.json.text.id = textChannel.id;
+ if(textChannel.type === 0){//text channel
+ self.json.text.type = 0;
+ self.json.text.name = textChannel.name;
+ }
+ else if (textChannel.type === 1){//pm
+ self.json.text.type = 1;
+ self.json.text.name = getUser(textChannel.recipients[0]).username;
+ }
+ else if (textChannel.type === 3){//group pm
+ self.json.text.type = 3;
+ if(textChannel.name)
+ self.json.text.name = textChannel.name;
+ else{
+ let newname = "";
+ for(let i = 0; i< textChannel.recipients.length; i++){
+ let user = textChannel.recipients[i];
+ newname += getUser(user).username + " ";
+ }
+ self.json.text.name = newname;
+ }
+ }
+ }
+ else
+ {
+ self.json.text.id = -1;
+ self.json.text.type = -1;
+ self.json.text.name = "";
+ }
+
+ if(voiceChannel){
+ if(voiceChannel.type === 1){//call
+ self.json.voice.type = 1;
+ self.json.voice.id = voiceChannel.id;
+ self.json.voice.name = getUser(voiceChannel.recipients[0]).username;
+ }
+ else if(voiceChannel.type === 2) {//voice channel
+ self.json.voice.type = 2;
+ self.json.voice.id = voiceChannel.id;
+ self.json.voice.name = voiceChannel.name;
+ }
+ }
+ else{
+ self.json.voice.id = -1;
+ self.json.voice.type = -1;
+ self.json.voice.name = "";
+ }
+
+ if(voiceStates){
+ let userVoiceState = voiceStates[localUser.id];
+ if(userVoiceState){
+ self.json.user.self_mute = userVoiceState.selfMute;
+ self.json.user.self_deafen = userVoiceState.selfDeaf;
+ }
+ }
+
+ self.json.user.unread_messages = false;
+ self.json.user.mentions = false;
+
+ if (document.querySelector('[class^="numberBadge-"]'))
+ self.json.user.mentions = true;
+ if (document.getElementsByClassName("bd-unread").length > 0)
+ self.json.user.unread_messages = true;
+
+ if(JSON.stringify(this.json) !== this.lastJson){
+ console.log("false");
+ this.lastJson = JSON.stringify(this.json);
+ this.sendJsonToAurora (this.json);
+ }
+ }, 100);
+
+ NeatoLib.Events.onPluginLoaded(this);
+ }
+
+ async sendJsonToAurora(json) {
+ fetch('http://localhost:9088/', {
+ method: 'POST',
+ body: JSON.stringify(json),
+ mode:'no-cors',
+ headers:{
+ 'Content-Type': 'application/json'
+ }
+ })
+ .catch (error => {
+ return undefined;
+ });
+ }
+}
diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/GameState_Discord.cs b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/GameState_Discord.cs
new file mode 100644
index 000000000..fe727d9e4
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/GameState_Discord.cs
@@ -0,0 +1,82 @@
+using Aurora.Profiles.Discord.GSI.Nodes;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aurora.Profiles.Discord.GSI {
+
+ public class GameState_Discord : GameState {
+
+ private ProviderNode _Provider;
+ private UserNode _User;
+ private GuildNode _Guild;
+ private TextNode _Text;
+ private VoiceNode _Voice;
+
+ ///
+ /// Provider node provides information about the data source so that Aurora can update the correct gamestate.
+ ///
+ public ProviderNode Provider {
+ get {
+ if (_Provider == null)
+ _Provider = new ProviderNode(_ParsedData["provider"]?.ToString() ?? "");
+ return _Provider;
+ }
+ }
+
+ public UserNode User
+ {
+ get
+ {
+ if (_User == null)
+ _User = new UserNode(_ParsedData["user"]?.ToString() ?? "");
+ return _User;
+ }
+ }
+
+ public GuildNode Guild
+ {
+ get
+ {
+ if (_Guild == null)
+ _Guild = new GuildNode(_ParsedData["guild"]?.ToString() ?? "");
+ return _Guild;
+ }
+ }
+ public TextNode Text {
+ get {
+ if (_Text == null)
+ _Text = new TextNode(_ParsedData["text"]?.ToString() ?? "");
+ return _Text;
+ }
+ }
+
+ public VoiceNode Voice {
+ get {
+ if (_Voice == null)
+ _Voice = new VoiceNode(_ParsedData["voice"]?.ToString() ?? "");
+ return _Voice;
+ }
+ }
+
+ ///
+ /// Creates a default GameState_Discord instance.
+ ///
+ public GameState_Discord() : base() { }
+
+ ///
+ /// Creates a GameState_Discord instance based on the passed JSON data.
+ ///
+ ///
+ public GameState_Discord(string JSONstring) : base(JSONstring) { }
+
+ ///
+ /// Creates a GameState_Discord instance based on the data from the passed GameState instance.
+ ///
+ public GameState_Discord(IGameState other) : base(other) { }
+
+ }
+}
diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/GuildNode.cs b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/GuildNode.cs
new file mode 100644
index 000000000..06ddb5cd3
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/GuildNode.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aurora.Profiles.Discord.GSI.Nodes {
+ public class GuildNode : Node {
+
+ public long Id = 0;
+ public string Name = String.Empty;
+
+ internal GuildNode() : base() { }
+ internal GuildNode(string json) : base(json) {
+ Id = GetLong("id");
+ Name = GetString("name");
+ }
+ }
+}
diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/ProviderNode.cs b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/ProviderNode.cs
new file mode 100644
index 000000000..2c5f5cd15
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/ProviderNode.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aurora.Profiles.Discord.GSI.Nodes {
+ public class ProviderNode : Node {
+
+ public string Name;
+ public int AppID;
+
+ internal ProviderNode(string json) : base(json) {
+ Name = GetString("name");
+ AppID = GetInt("appid");
+ }
+ }
+}
diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/TextNode.cs b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/TextNode.cs
new file mode 100644
index 000000000..a8b7e371b
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/TextNode.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aurora.Profiles.Discord.GSI.Nodes {
+
+ public enum DiscordTextType
+ {
+ Undefined = -1,
+ TextChannel = 0,
+ DirectMessage = 1,
+ GroupChat = 3
+ }
+
+
+ public class TextNode : Node {
+
+ public long Id = 0;
+ public string Name;
+ public int Type;
+
+ internal TextNode() : base() { }
+ internal TextNode(string json) : base(json) {
+ Id = GetLong("id");
+ Name = GetString("name");
+ Type = GetInt("type");
+ }
+ }
+}
diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/UserNode.cs b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/UserNode.cs
new file mode 100644
index 000000000..980601b39
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/UserNode.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aurora.Profiles.Discord.GSI.Nodes {
+
+ public enum DiscordStatus
+ {
+ Undefined,
+ Online,
+ Idle,
+ DoNotDisturb,
+ Invisible
+ }
+
+
+ public class UserNode : Node {
+
+ public long Id = 0;
+ public string Status = "";
+ public bool SelfMute = false;
+ public bool SelfDeafen = false;
+ public bool Mentions = false;
+ public bool UnreadMessages = false;
+
+ internal UserNode() : base() { }
+ internal UserNode(string json) : base(json) {
+ Id = GetLong("id");
+ Status = GetString("status");
+ SelfMute = GetBool("self_mute");
+ SelfDeafen = GetBool("self_deafen");
+ Mentions = GetBool("mentions");
+ UnreadMessages = GetBool("unread_messages");
+ }
+ }
+}
diff --git a/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/VoiceNode.cs b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/VoiceNode.cs
new file mode 100644
index 000000000..1aa8b76c2
--- /dev/null
+++ b/Project-Aurora/Project-Aurora/Profiles/Discord/GSI/Nodes/VoiceNode.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aurora.Profiles.Discord.GSI.Nodes {
+
+ public enum DiscordVoiceType
+ {
+ Undefined = -1,
+ Call = 1,
+ VoiceChannel = 2,
+ }
+
+ public class VoiceNode : Node {
+
+ public long Id = 0;
+ public string Name;
+ public int Type;
+
+
+ internal VoiceNode() : base() { }
+ internal VoiceNode(string json) : base(json) {
+ Id = GetLong("id");
+ Name = GetString("name");
+ Type = GetInt("type");
+ }
+ }
+}
diff --git a/Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs b/Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs
index 2b6fc49ce..1ea362aa8 100755
--- a/Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs
+++ b/Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs
@@ -154,7 +154,8 @@ public bool Initialize()
new CloneHero.CloneHero(),
new Osu.Osu(),
new Slime_Rancher.Slime_Rancher(),
- new Terraria.Terraria()
+ new Terraria.Terraria(),
+ new Discord.Discord()
});
RegisterLayerHandlers(new List {
diff --git a/Project-Aurora/Project-Aurora/Project-Aurora.csproj b/Project-Aurora/Project-Aurora/Project-Aurora.csproj
index f98fd85c9..9d5bee45e 100644
--- a/Project-Aurora/Project-Aurora/Project-Aurora.csproj
+++ b/Project-Aurora/Project-Aurora/Project-Aurora.csproj
@@ -376,6 +376,17 @@
Control_FieldPresenter.xaml
+
+ Control_Discord.xaml
+
+
+
+
+
+
+
+
+
@@ -938,6 +949,7 @@
+
@@ -1613,6 +1625,7 @@
+
Always
@@ -1709,6 +1722,10 @@
Designer
MSBuild:Compile
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
diff --git a/Project-Aurora/Project-Aurora/Properties/Resources.Designer.cs b/Project-Aurora/Project-Aurora/Properties/Resources.Designer.cs
index 4882dc8ab..77274c59f 100644
--- a/Project-Aurora/Project-Aurora/Properties/Resources.Designer.cs
+++ b/Project-Aurora/Project-Aurora/Properties/Resources.Designer.cs
@@ -19,7 +19,7 @@ namespace Aurora.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -210,6 +210,16 @@ internal static System.Drawing.Bitmap desktop_icon {
}
}
+ ///
+ /// Looks up a localized resource of type System.Byte[].
+ ///
+ internal static byte[] DiscordGSIPlugin {
+ get {
+ object obj = ResourceManager.GetObject("DiscordGSIPlugin", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/Project-Aurora/Project-Aurora/Properties/Resources.resx b/Project-Aurora/Project-Aurora/Properties/Resources.resx
index 915824b8a..5efed4614 100755
--- a/Project-Aurora/Project-Aurora/Properties/Resources.resx
+++ b/Project-Aurora/Project-Aurora/Properties/Resources.resx
@@ -310,4 +310,7 @@
..\Resources\Skype_300x300.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Profiles\Discord\GSI\AuroraGSI.plugin.js;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
\ No newline at end of file
diff --git a/Project-Aurora/Project-Aurora/Resources/betterdiscord.png b/Project-Aurora/Project-Aurora/Resources/betterdiscord.png
new file mode 100644
index 000000000..d9c9385c6
Binary files /dev/null and b/Project-Aurora/Project-Aurora/Resources/betterdiscord.png differ