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

@ -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

@ -10,12 +10,13 @@
"exclude": [ ],
},
"copyToOutput": {
"include": [ "data" , "libs"],
"include": [ "data", "libs" ],
"exclude": [ "data/musicdata" ],
"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": {}
}
}