More cleanup

- Moved all bot files to src/NadekoBot
- Fixed tests path in ci
- Fixed some warnings in MusicService
- Cleaned up csproj slightly
This commit is contained in:
Kwoth
2021-06-18 04:00:05 +02:00
parent 6b92cb3c89
commit 38c7f32a76
14 changed files with 41 additions and 135 deletions

View File

@@ -3,63 +3,6 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<OutputType>exe</OutputType>
<ApplicationIcon>nadeko_icon.ico</ApplicationIcon>
<RollForward>Major</RollForward>
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Version)' == '' ">
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">2.0.0</VersionPrefix>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix).$(VersionSuffix)</Version>
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
</PropertyGroup>
<ItemGroup>
<Compile Remove="credentials.json" />
<None Update="data\**\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="_strings\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="data\images_backup.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="data\xp_template.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="data\xp_template_backup.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="external\**\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="nadeko_icon.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="credentials_example.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="libopus.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libsodium.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libsodium.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="opus.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'GlobalNadeko' ">
<DefineConstants>$(DefineConstants);GLOBAL_NADEKO</DefineConstants>
<NoWarn>$(NoWarn);CS1573;CS1591;CS8032</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\NadekoBot\NadekoBot.csproj" />
</ItemGroup>
</PropertyGroup>
</Project>

View File

@@ -1,34 +0,0 @@
using NadekoBot.Core.Services;
using System.Diagnostics;
using System.Threading.Tasks;
namespace NadekoBot
{
public sealed class Program
{
public static async Task Main(string[] args)
{
var pid = Process.GetCurrentProcess().Id;
System.Console.WriteLine($"Pid: {pid}");
if (args.Length == 2
&& int.TryParse(args[0], out int shardId)
&& int.TryParse(args[1], out int parentProcessId))
{
await new NadekoBot(shardId, parentProcessId == 0 ? pid : parentProcessId)
.RunAndBlockAsync();
}
else
{
await new ShardsCoordinator()
.RunAsync()
.ConfigureAwait(false);
#if DEBUG
await new NadekoBot(0, pid)
.RunAndBlockAsync();
#else
await Task.Delay(-1);
#endif
}
}
}
}

View File

@@ -1,32 +0,0 @@
{
"Token": "MTE5Nzc3MDIxMzE5NTc3NjEw.VlhNCw.xZ3lOoy35iROltPJVOXB2IaEMME",
"OwnerIds": [
105635576866156544
],
"LoLApiKey": "",
"GoogleApiKey": "",
"MashapeKey": "",
"OsuApiKey": "",
"SoundCloudClientId": "",
"CleverbotApiKey": "",
"CarbonKey": "",
"Db": {
"Type": "sqlite",
"ConnectionString": "Data Source=data/NadekoBot.db"
},
"TotalShards": 1,
"PatreonAccessToken": "",
"PatreonCampaignId": "334038",
"RestartCommand": null,
"ShardRunCommand": "",
"ShardRunArguments": "",
"ShardRunPort": null,
"BotListToken": null,
"TwitchClientId": null,
"VotesToken": null,
"VotesUrl": null,
"RedisOptions": null,
"LocationIqApiKey": null,
"TimezoneDbApiKey": null,
"CoinmarketcapApiKey": null
}

View File

@@ -1,31 +0,0 @@
{
"Token": "",
"OwnerIds": [
105635576866156544
],
"GoogleApiKey": "",
"MashapeKey": "",
"OsuApiKey": "",
"SoundCloudClientId": "",
"CleverbotApiKey": "",
"CarbonKey": "",
"Db": {
"Type": "sqlite",
"ConnectionString": "Data Source=data/NadekoBot.db"
},
"TotalShards": 1,
"PatreonAccessToken": "",
"PatreonCampaignId": "334038",
"RestartCommand": null,
"ShardRunCommand": "",
"ShardRunArguments": "",
"ShardRunPort": null,
"BotListToken": null,
"TwitchClientId": null,
"VotesToken": null,
"VotesUrl": null,
"RedisOptions": null,
"LocationIqApiKey": null,
"TimezoneDbApiKey": null,
"CoinmarketcapApiKey": null
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.