private bool TryCompileScript(string script, out IEnumerable <IDiscordScript> scripts) { CompilerOptions options = new CompilerOptions(); options.AddReference(Utilities.AssemblyLocation <Logging>()); options.AddReference(Utilities.AssemblyLocation <IDiscordScript>()); options.AddReference(Utilities.AssemblyLocation <MediaPlayer>()); #if DEBUG options.AddReferenceSearchFolder(Path.GetDirectoryName(typeof(IDiscordClient).GetTypeInfo().Assembly.Location)); //core options.AddReferenceSearchFolder(Path.GetDirectoryName(typeof(DiscordSocketClient).GetTypeInfo().Assembly.Location)); //web socket options.AddReferenceSearchFolder(Path.GetDirectoryName(typeof(DiscordRestClient).GetTypeInfo().Assembly.Location)); //Rest #endif options.AddReference("Discord.Net.Core.dll"); options.AddReference("Discord.Net.WebSocket.dll"); options.AddReference("Discord.Net.Rest.dll"); return(ScriptBuilder.Instance.TryBuildScript(script, options, out scripts)); }