mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 01:08:26 -04:00
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:
@@ -6,7 +6,7 @@ stages:
|
||||
|
||||
variables:
|
||||
project: "NadekoBot"
|
||||
tests: "Nadeko.Tests"
|
||||
tests: "NadekoBot.Tests"
|
||||
|
||||
before_script:
|
||||
- "dotnet restore"
|
||||
|
@@ -6,12 +6,12 @@ MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0B2F1537-4BF0-422B-A0DD-8F9CCEFB340F}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
license.md = license.md
|
||||
mkdocs.yml = mkdocs.yml
|
||||
NadekoBot.iss = NadekoBot.iss
|
||||
release.ps1 = release.ps1
|
||||
EndProjectSection
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
CHANGELOG.md = CHANGELOG.md
|
||||
LICENSE.md = LICENSE.md
|
||||
README.md = README.md
|
||||
.gitlab-ci.yml = .gitlab-ci.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot", "src\NadekoBot\NadekoBot.csproj", "{45EC1473-C678-4857-A544-07DFE0D0B478}"
|
||||
EndProject
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
}
|
@@ -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
|
||||
}
|
@@ -1,5 +1,6 @@
|
||||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using NadekoBot.Core.Common;
|
||||
@@ -24,7 +25,7 @@ namespace NadekoBot.Modules.Music.Services
|
||||
public Task JoinVoiceChannelAsync(ulong guildId, ulong voiceChannelId);
|
||||
|
||||
Task<IMusicPlayer?> GetOrCreateMusicPlayerAsync(ITextChannel contextChannel);
|
||||
bool TryGetMusicPlayer(ulong guildId, out IMusicPlayer musicPlayer);
|
||||
bool TryGetMusicPlayer(ulong guildId, [MaybeNullWhen(false)] out IMusicPlayer musicPlayer);
|
||||
Task<int> EnqueueYoutubePlaylistAsync(IMusicPlayer mp, string playlistId, string queuer);
|
||||
Task EnqueueDirectoryAsync(IMusicPlayer mp, string dirPath, string queuer);
|
||||
Task<int> EnqueueSoundcloudPlaylistAsync(IMusicPlayer mp, string playlist, string queuer);
|
||||
|
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
@@ -93,7 +94,7 @@ namespace NadekoBot.Modules.Music.Services
|
||||
return _players.GetOrAdd(contextChannel.GuildId, newPLayer);
|
||||
}
|
||||
|
||||
public bool TryGetMusicPlayer(ulong guildId, out IMusicPlayer musicPlayer)
|
||||
public bool TryGetMusicPlayer(ulong guildId, [MaybeNullWhen(false)] out IMusicPlayer musicPlayer)
|
||||
=> _players.TryGetValue(guildId, out musicPlayer);
|
||||
|
||||
public async Task<int> EnqueueYoutubePlaylistAsync(IMusicPlayer mp, string query, string queuer)
|
||||
|
@@ -3,12 +3,11 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
||||
<OutputType>exe</OutputType>
|
||||
<ApplicationIcon>nadeko_icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Modules\Administration\ModuleCommands.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AngleSharp" Version="0.14.0" />
|
||||
<PackageReference Include="AWSSDK.S3" Version="3.7.0.14" />
|
||||
@@ -50,6 +49,31 @@
|
||||
<ProjectReference Include="..\ayu\Ayu.Discord.Voice\Ayu.Discord.Voice.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="credentials.json" />
|
||||
<None Update="data\**\*">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="nadeko_icon.ico;libopus.so;libsodium.so;libsodium.dll;opus.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="data\images_backup.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="data\xp_template_backup.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="credentials_example.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Version)' == '' ">
|
||||
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">2.0.0</VersionPrefix>
|
||||
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix).$(VersionSuffix)</Version>
|
||||
<Version Condition=" '$(Version)' == '' ">$(VersionPrefix)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'GlobalNadeko' ">
|
||||
<DefineConstants>$(DefineConstants);GLOBAL_NADEKO</DefineConstants>
|
||||
<NoWarn>$(NoWarn);CS1573;CS1591</NoWarn>
|
||||
|
Before Width: | Height: | Size: 381 KiB After Width: | Height: | Size: 381 KiB |
Reference in New Issue
Block a user