Specifying globalNadeko as a configuration during build will not load music

This commit is contained in:
Kwoth 2016-10-12 06:29:15 +02:00
parent 4be988df1a
commit 38911fa409
5 changed files with 25 additions and 4 deletions

View File

@ -21,23 +21,32 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
GlobalNadeko|Any CPU = GlobalNadeko|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{45EC1473-C678-4857-A544-07DFE0D0B478}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{45EC1473-C678-4857-A544-07DFE0D0B478}.Debug|Any CPU.Build.0 = Debug|Any CPU
{45EC1473-C678-4857-A544-07DFE0D0B478}.GlobalNadeko|Any CPU.ActiveCfg = GlobalNadeko|Any CPU
{45EC1473-C678-4857-A544-07DFE0D0B478}.GlobalNadeko|Any CPU.Build.0 = GlobalNadeko|Any CPU
{45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.Build.0 = Release|Any CPU
{91E9E7BD-75C9-4E98-84AA-2C271922E5C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91E9E7BD-75C9-4E98-84AA-2C271922E5C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91E9E7BD-75C9-4E98-84AA-2C271922E5C2}.GlobalNadeko|Any CPU.ActiveCfg = GlobalNadeko|Any CPU
{91E9E7BD-75C9-4E98-84AA-2C271922E5C2}.GlobalNadeko|Any CPU.Build.0 = GlobalNadeko|Any CPU
{91E9E7BD-75C9-4E98-84AA-2C271922E5C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91E9E7BD-75C9-4E98-84AA-2C271922E5C2}.Release|Any CPU.Build.0 = Release|Any CPU
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.GlobalNadeko|Any CPU.ActiveCfg = GlobalNadeko|Any CPU
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.GlobalNadeko|Any CPU.Build.0 = GlobalNadeko|Any CPU
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.Release|Any CPU.Build.0 = Release|Any CPU
{14CBADA0-971C-44E3-B331-C7D01DD74F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14CBADA0-971C-44E3-B331-C7D01DD74F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14CBADA0-971C-44E3-B331-C7D01DD74F0B}.GlobalNadeko|Any CPU.ActiveCfg = GlobalNadeko|Any CPU
{14CBADA0-971C-44E3-B331-C7D01DD74F0B}.GlobalNadeko|Any CPU.Build.0 = GlobalNadeko|Any CPU
{14CBADA0-971C-44E3-B331-C7D01DD74F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14CBADA0-971C-44E3-B331-C7D01DD74F0B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection

View File

@ -18,7 +18,7 @@ using NadekoBot.Services.Database.Models;
namespace NadekoBot.Modules.Music
{
[NadekoModule("Music", "!!")]
[NadekoModule("Music", "!!", AutoLoad = false)]
public partial class Music : DiscordModule
{
public static ConcurrentDictionary<ulong, MusicPlayer> MusicPlayers = new ConcurrentDictionary<ulong, MusicPlayer>();

View File

@ -18,6 +18,7 @@ using NadekoBot.Modules.Permissions;
using Module = Discord.Commands.Module;
using NadekoBot.TypeReaders;
using System.Collections.Concurrent;
using NadekoBot.Modules.Music;
namespace NadekoBot
{
@ -93,7 +94,9 @@ namespace NadekoBot
await CommandHandler.StartHandling();
await CommandService.LoadAssembly(Assembly.GetEntryAssembly(), depMap).ConfigureAwait(false);
#if !GLOBAL_NADEKO
await CommandService.Load(new Music(Localizer, CommandService, Client, Google)).ConfigureAwait(false);
#endif
Console.WriteLine(await Stats.Print().ConfigureAwait(false));
await Task.Delay(-1);

View File

@ -15,7 +15,8 @@
"mappings": {
"./": "./libs"
}
}
},
"define": []
},
"dependencies": {
"Microsoft.NETCore.App": {
@ -51,5 +52,10 @@
"portable-net45+win8+wpa81"
]
}
},
"configurations": {
"GlobalNadeko": {
"buildOptions": {"define": ["GLOBAL_NADEKO"]}
}
}
}

View File

@ -23,5 +23,8 @@
"portable-net451+win8"
]
}
},
"configurations": {
"GlobalNadeko": {}
}
}