diff --git a/.gitignore b/.gitignore
index 0967eed..e097973 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
appsettings.*.json
.env*
-Properties/launchSettings.json
+Kasbot.APP/*/launchSettings.json
.vs
.vscode
diff --git a/Dockerfile b/Dockerfile
index d8c1f73..9f0f113 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,9 +2,12 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
WORKDIR /App
# Copy everything
-COPY . ./
+COPY ./Kasbot.APP ./Kasbot.APP
+COPY ./Kasbot.sln ./Kasbot.sln
+
# Restore as distinct layers
RUN dotnet restore
+
# Build a release
RUN dotnet build -c Release -o out
diff --git a/Annotations/FlagAttribute.cs b/Kasbot.APP/Annotations/FlagAttribute.cs
similarity index 100%
rename from Annotations/FlagAttribute.cs
rename to Kasbot.APP/Annotations/FlagAttribute.cs
diff --git a/Extensions/RestMessageExtensions.cs b/Kasbot.APP/Extensions/RestMessageExtensions.cs
similarity index 100%
rename from Extensions/RestMessageExtensions.cs
rename to Kasbot.APP/Extensions/RestMessageExtensions.cs
diff --git a/Extensions/SocketMessageExtensions.cs b/Kasbot.APP/Extensions/SocketMessageExtensions.cs
similarity index 100%
rename from Extensions/SocketMessageExtensions.cs
rename to Kasbot.APP/Extensions/SocketMessageExtensions.cs
diff --git a/Kasbot.csproj b/Kasbot.APP/Kasbot.App.csproj
similarity index 89%
rename from Kasbot.csproj
rename to Kasbot.APP/Kasbot.App.csproj
index 01ee786..4e6c9f7 100644
--- a/Kasbot.csproj
+++ b/Kasbot.APP/Kasbot.App.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/Models/Connection.cs b/Kasbot.APP/Models/Connection.cs
similarity index 100%
rename from Models/Connection.cs
rename to Kasbot.APP/Models/Connection.cs
diff --git a/Models/Flags.cs b/Kasbot.APP/Models/Flags.cs
similarity index 100%
rename from Models/Flags.cs
rename to Kasbot.APP/Models/Flags.cs
diff --git a/Modules/CommandModule.cs b/Kasbot.APP/Modules/CommandModule.cs
similarity index 96%
rename from Modules/CommandModule.cs
rename to Kasbot.APP/Modules/CommandModule.cs
index 242bcfe..9d2b346 100644
--- a/Modules/CommandModule.cs
+++ b/Kasbot.APP/Modules/CommandModule.cs
@@ -2,9 +2,9 @@ using Discord;
using Discord.Commands;
using Kasbot.Models;
using Kasbot.Services;
-using TextCommandFramework.Services;
+using Kasbot.Services;
-namespace TextCommandFramework.Modules
+namespace Kasbot.Modules
{
public class CommandModule : ModuleBase
{
diff --git a/Program.cs b/Kasbot.APP/Program.cs
similarity index 97%
rename from Program.cs
rename to Kasbot.APP/Program.cs
index bf2abc0..22448cf 100644
--- a/Program.cs
+++ b/Kasbot.APP/Program.cs
@@ -4,14 +4,13 @@ using Discord.WebSocket;
using Kasbot.Services;
using Kasbot.Services.Internal;
using Microsoft.Extensions.DependencyInjection;
-using TextCommandFramework.Services;
-namespace TextCommandFramework
+namespace Kasbot
{
class Program
{
private static string TOKEN = Environment.GetEnvironmentVariable("TOKEN");
- private static int SHARDS = int.Parse(Environment.GetEnvironmentVariable("SHARDS"));
+ private static int SHARDS = int.Parse(Environment.GetEnvironmentVariable("SHARDS") ?? "0");
static void Main(string[] args)
{
diff --git a/Services/CommandHandlingService.cs b/Kasbot.APP/Services/CommandHandlingService.cs
similarity index 98%
rename from Services/CommandHandlingService.cs
rename to Kasbot.APP/Services/CommandHandlingService.cs
index 65c6ae8..27a7d69 100644
--- a/Services/CommandHandlingService.cs
+++ b/Kasbot.APP/Services/CommandHandlingService.cs
@@ -7,7 +7,7 @@ using System;
using System.Reflection;
using System.Threading.Tasks;
-namespace TextCommandFramework.Services
+namespace Kasbot.Services
{
public class CommandHandlingService
{
diff --git a/Services/Internal/AudioService.cs b/Kasbot.APP/Services/Internal/AudioService.cs
similarity index 100%
rename from Services/Internal/AudioService.cs
rename to Kasbot.APP/Services/Internal/AudioService.cs
diff --git a/Services/Internal/YoutubeService.cs b/Kasbot.APP/Services/Internal/YoutubeService.cs
similarity index 100%
rename from Services/Internal/YoutubeService.cs
rename to Kasbot.APP/Services/Internal/YoutubeService.cs
diff --git a/Services/PictureService.cs b/Kasbot.APP/Services/PictureService.cs
similarity index 91%
rename from Services/PictureService.cs
rename to Kasbot.APP/Services/PictureService.cs
index 5c8e1dd..bbe69ed 100644
--- a/Services/PictureService.cs
+++ b/Kasbot.APP/Services/PictureService.cs
@@ -2,7 +2,7 @@ using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
-namespace TextCommandFramework.Services
+namespace Kasbot.Services
{
public class PictureService
{
diff --git a/Services/PlayerService.cs b/Kasbot.APP/Services/PlayerService.cs
similarity index 99%
rename from Services/PlayerService.cs
rename to Kasbot.APP/Services/PlayerService.cs
index b8b6d6e..dbf656c 100644
--- a/Services/PlayerService.cs
+++ b/Kasbot.APP/Services/PlayerService.cs
@@ -159,7 +159,8 @@ namespace Kasbot.Services
(outAudioStream) =>
{
Clients[guildId].CurrentAudioStream = outAudioStream;
- }, async (ac) =>
+ },
+ async (ac) =>
{
if (ac.Exception != null)
{
diff --git a/Kasbot.sln b/Kasbot.sln
index 83cd07c..8fe50f1 100644
--- a/Kasbot.sln
+++ b/Kasbot.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kasbot", "Kasbot.csproj", "{70A0CD18-5914-4104-A1A1-C531B96FCC20}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kasbot.App", "Kasbot.APP\Kasbot.App.csproj", "{BD715B63-0FC8-42F5-A449-9FF029B8E599}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,10 +11,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {70A0CD18-5914-4104-A1A1-C531B96FCC20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {70A0CD18-5914-4104-A1A1-C531B96FCC20}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {70A0CD18-5914-4104-A1A1-C531B96FCC20}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {70A0CD18-5914-4104-A1A1-C531B96FCC20}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BD715B63-0FC8-42F5-A449-9FF029B8E599}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BD715B63-0FC8-42F5-A449-9FF029B8E599}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BD715B63-0FC8-42F5-A449-9FF029B8E599}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BD715B63-0FC8-42F5-A449-9FF029B8E599}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE