mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2024-10-02 20:13:13 +00:00
ci: Possible CI fix. Breaking RID change. Windows 7 no longer supported :\
refactor: Ayu.Discord.Voice renamed to NadekoBot.Voice to avoid confusion
This commit is contained in:
parent
4a378b9663
commit
ddeded9a70
25 changed files with 32 additions and 95 deletions
|
@ -33,8 +33,8 @@ build:
|
|||
script:
|
||||
- "dotnet publish -c Release -r linux-x64 --self-contained -o $LINUX_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r linux-arm64 --self-contained -o $LINUX_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r win7-x64 --self-contained -o $WIN_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r win7-arm64 --self-contained -o $WIN_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r win-x64 --self-contained -o $WIN_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r win-arm64 --self-contained -o $WIN_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r osx-x64 --self-contained -o $MACOS_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
- "dotnet publish -c Release -r osx-arm64 --self-contained -o $MACOS_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||
artifacts:
|
||||
|
|
|
@ -7,7 +7,7 @@ COPY src/Nadeko.Common/*.csproj src/Nadeko.Common/
|
|||
COPY src/NadekoBot/*.csproj src/NadekoBot/
|
||||
COPY src/NadekoBot.Coordinator/*.csproj src/NadekoBot.Coordinator/
|
||||
COPY src/NadekoBot.Generators/*.csproj src/NadekoBot.Generators/
|
||||
COPY src/ayu/Ayu.Discord.Voice/*.csproj src/ayu/Ayu.Discord.Voice/
|
||||
COPY src/ayu/NadekoBot.Voice/*.csproj src/ayu/NadekoBot.Voice/
|
||||
COPY NuGet.Config ./
|
||||
RUN dotnet restore src/NadekoBot/
|
||||
|
||||
|
|
|
@ -436,7 +436,7 @@ public sealed class Help : NadekoModule<HelpService>
|
|||
ContentType = "application/json",
|
||||
ContentBody = uploadData,
|
||||
// either use a path provided in the argument or the default one for public nadeko, other/cmds.json
|
||||
Key = $"cmds/{StatsService.BOT_VERSION}.json",
|
||||
Key = $"cmds/{StatsService.BotVersion}.json",
|
||||
CannedACL = S3CannedACL.PublicRead
|
||||
});
|
||||
}
|
||||
|
@ -461,11 +461,11 @@ public sealed class Help : NadekoModule<HelpService>
|
|||
}
|
||||
|
||||
var versionList = JsonSerializer.Deserialize<List<string>>(versionListString);
|
||||
if (versionList is not null && !versionList.Contains(StatsService.BOT_VERSION))
|
||||
if (versionList is not null && !versionList.Contains(StatsService.BotVersion))
|
||||
{
|
||||
// save the file with new version added
|
||||
// versionList.Add(StatsService.BotVersion);
|
||||
versionListString = JsonSerializer.Serialize(versionList.Prepend(StatsService.BOT_VERSION),
|
||||
versionListString = JsonSerializer.Serialize(versionList.Prepend(StatsService.BotVersion),
|
||||
new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = true
|
||||
|
@ -487,7 +487,7 @@ public sealed class Help : NadekoModule<HelpService>
|
|||
{
|
||||
Log.Warning(
|
||||
"Version {Version} already exists in the version file. " + "Did you forget to increment it?",
|
||||
StatsService.BOT_VERSION);
|
||||
StatsService.BotVersion);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#nullable disable
|
||||
using Ayu.Discord.Voice;
|
||||
using NadekoBot.Voice;
|
||||
using System.Reflection;
|
||||
|
||||
namespace NadekoBot.Modules.Music.Services;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#nullable disable
|
||||
using Ayu.Discord.Voice;
|
||||
using NadekoBot.Voice;
|
||||
|
||||
namespace NadekoBot.Modules.Music;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Ayu.Discord.Voice;
|
||||
using NadekoBot.Voice;
|
||||
using NadekoBot.Db.Models;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#nullable disable
|
||||
using Ayu.Discord.Voice;
|
||||
using Ayu.Discord.Voice.Models;
|
||||
using NadekoBot.Voice;
|
||||
using NadekoBot.Voice.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Music;
|
||||
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
// using AngleSharp.Html.Dom;
|
||||
// using MorseCode.ITask;
|
||||
// using NadekoBot.Modules.Searches.Common;
|
||||
// using System.Net;
|
||||
//
|
||||
// namespace NadekoBot.Modules.Searches.DuckDuckGo;
|
||||
//
|
||||
// public sealed class DuckDuckGoSeachService : SearchServiceBase
|
||||
// {
|
||||
// private static readonly HtmlParser _googleParser = new(new()
|
||||
// {
|
||||
// IsScripting = false,
|
||||
// IsEmbedded = false,
|
||||
// IsSupportingProcessingInstructions = false,
|
||||
// IsKeepingSourceReferences = false,
|
||||
// IsNotSupportingFrames = true
|
||||
// });
|
||||
//
|
||||
// public override async ITask<SearchResultData> SearchAsync(string query)
|
||||
// {
|
||||
// query = WebUtility.UrlEncode(query)?.Replace(' ', '+');
|
||||
//
|
||||
// var fullQueryLink = "https://html.duckduckgo.com/html";
|
||||
//
|
||||
// using var http = _httpFactory.CreateClient();
|
||||
// http.DefaultRequestHeaders.Clear();
|
||||
// http.DefaultRequestHeaders.Add("User-Agent",
|
||||
// "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36");
|
||||
//
|
||||
// using var formData = new MultipartFormDataContent();
|
||||
// formData.Add(new StringContent(query), "q");
|
||||
// using var response = await http.PostAsync(fullQueryLink, formData);
|
||||
// var content = await response.Content.ReadAsStringAsync();
|
||||
//
|
||||
// using var document = await _googleParser.ParseDocumentAsync(content);
|
||||
// var searchResults = document.QuerySelector(".results");
|
||||
// var elems = searchResults.QuerySelectorAll(".result");
|
||||
//
|
||||
// if (!elems.Any())
|
||||
// return default;
|
||||
//
|
||||
// var results = elems.Select(elem =>
|
||||
// {
|
||||
// if (elem.QuerySelector(".result__a") is not IHtmlAnchorElement anchor)
|
||||
// return null;
|
||||
//
|
||||
// var href = anchor.Href;
|
||||
// var name = anchor.TextContent;
|
||||
//
|
||||
// if (string.IsNullOrWhiteSpace(href) || string.IsNullOrWhiteSpace(name))
|
||||
// return null;
|
||||
//
|
||||
// var txt = elem.QuerySelector(".result__snippet")?.TextContent;
|
||||
//
|
||||
// if (string.IsNullOrWhiteSpace(txt))
|
||||
// return null;
|
||||
//
|
||||
// return new GoogleSearchResult(name, href, txt);
|
||||
// })
|
||||
// .Where(x => x is not null)
|
||||
// .ToList();
|
||||
//
|
||||
// return new(results.AsReadOnly(), fullQueryLink, "0");
|
||||
// }
|
||||
// }
|
|
@ -293,7 +293,7 @@ public partial class Utility : NadekoModule
|
|||
|
||||
await EmbedAsync(_eb.Create()
|
||||
.WithOkColor()
|
||||
.WithAuthor($"NadekoBot v{StatsService.BOT_VERSION}",
|
||||
.WithAuthor($"NadekoBot v{StatsService.BotVersion}",
|
||||
"https://nadeko-pictures.nyc3.digitaloceanspaces.com/other/avatar.png",
|
||||
"https://nadekobot.readthedocs.io/en/latest/")
|
||||
.AddField(GetText(strs.author), _stats.Author, true)
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>true</ImplicitUsings>
|
||||
<Version>5.0.0-beta1</Version>
|
||||
<Version>5.0.0</Version>
|
||||
<VersionSuffix>beta1</VersionSuffix>
|
||||
|
||||
<!-- Output/build -->
|
||||
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
||||
|
|
|
@ -7,7 +7,8 @@ namespace NadekoBot.Services;
|
|||
|
||||
public sealed class StatsService : IStatsService, IReadyExecutor, INService
|
||||
{
|
||||
public const string BOT_VERSION = "5.0.0-beta1";
|
||||
public static string BotVersion
|
||||
=> typeof(Bot).Assembly.GetName().Version?.ToString(3) ?? "Custom";
|
||||
|
||||
public string Author
|
||||
=> "Kwoth#2452";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ayu.Discord.Voice
|
||||
namespace NadekoBot.Voice
|
||||
{
|
||||
internal static unsafe class LibOpus
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ayu.Discord.Voice
|
||||
namespace NadekoBot.Voice
|
||||
{
|
||||
internal static unsafe class Sodium
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace Ayu.Discord.Voice.Models
|
||||
namespace NadekoBot.Voice.Models
|
||||
{
|
||||
public sealed class SelectProtocol
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace Ayu.Discord.Voice.Models
|
||||
namespace NadekoBot.Voice.Models
|
||||
{
|
||||
public sealed class VoiceHello
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace Ayu.Discord.Voice.Models
|
||||
namespace NadekoBot.Voice.Models
|
||||
{
|
||||
public sealed class VoiceIdentify
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace Ayu.Discord.Voice.Models
|
||||
namespace NadekoBot.Voice.Models
|
||||
{
|
||||
public sealed class VoiceReady
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace Ayu.Discord.Voice.Models
|
||||
namespace NadekoBot.Voice.Models
|
||||
{
|
||||
public sealed class VoiceResume
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace Ayu.Discord.Voice.Models
|
||||
namespace NadekoBot.Voice.Models
|
||||
{
|
||||
public sealed class VoiceSessionDescription
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace Ayu.Discord.Voice.Models
|
||||
namespace NadekoBot.Voice.Models
|
||||
{
|
||||
public sealed class VoiceSpeaking
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<NoWarn>CS8632</NoWarn>
|
||||
<Version>1.0.2</Version>
|
||||
<RootNamespace>Ayu.Discord.Voice</RootNamespace>
|
||||
<RootNamespace>NadekoBot.Voice</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Buffers;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ayu.Discord.Voice
|
||||
namespace NadekoBot.Voice
|
||||
{
|
||||
public sealed class PoopyBufferImmortalized : ISongBuffer
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Diagnostics;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ayu.Discord.Voice
|
||||
namespace NadekoBot.Voice
|
||||
{
|
||||
public interface ISongBuffer : IDisposable
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.Buffers;
|
||||
|
||||
namespace Ayu.Discord.Voice
|
||||
namespace NadekoBot.Voice
|
||||
{
|
||||
public sealed class VoiceClient : IDisposable
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Ayu.Discord.Voice.Models;
|
||||
using NadekoBot.Voice.Models;
|
||||
using Discord.Models.Gateway;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Serilog;
|
||||
|
@ -12,7 +12,7 @@ using System.Threading.Tasks;
|
|||
using Ayu.Discord.Gateway;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Ayu.Discord.Voice
|
||||
namespace NadekoBot.Voice
|
||||
{
|
||||
public class VoiceGateway
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue