[sticker-tools] add to dockerfile, adjust project configuration

Co-authored-by: voed <voed@i.ua>
This commit is contained in:
Andriy
2023-01-13 01:28:34 +02:00
parent 7598f77637
commit f1c4375613
4 changed files with 27 additions and 20 deletions
+1
View File
@@ -18,6 +18,7 @@ COPY ./modules/Reputation/*.csproj ./modules/Reputation/
COPY ./modules/ContentStore/*.csproj ./modules/ContentStore/ COPY ./modules/ContentStore/*.csproj ./modules/ContentStore/
COPY ./modules/DebugTools/*.csproj ./modules/DebugTools/ COPY ./modules/DebugTools/*.csproj ./modules/DebugTools/
COPY ./modules/CodeWatcher/*.csproj ./modules/CodeWatcher/ COPY ./modules/CodeWatcher/*.csproj ./modules/CodeWatcher/
COPY ./modules/StickerTools/*.csproj ./modules/StickerTools/
RUN dotnet restore Kruzya.TelegramBot.sln RUN dotnet restore Kruzya.TelegramBot.sln
# Copy all project files # Copy all project files
+4 -4
View File
@@ -2,11 +2,11 @@
using BotFramework.Attributes; using BotFramework.Attributes;
using BotFramework.Enums; using BotFramework.Enums;
using SixLabors.ImageSharp; using SixLabors.ImageSharp;
using Telegram.Bot.Types.Enums;
using Telegram.Bot; using Telegram.Bot;
using Telegram.Bot.Types; using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
namespace StickerTools; namespace West.TelegramBot.StickerTools;
public class Handler : BotEventHandler public class Handler : BotEventHandler
{ {
@@ -30,7 +30,7 @@ public class Handler : BotEventHandler
using var outfile = new MemoryStream(); using var outfile = new MemoryStream();
await img.SaveAsPngAsync(outfile); await img.SaveAsPngAsync(outfile);
outfile.Position = 0; outfile.Position = 0;
await Bot.SendDocumentAsync(Chat.Id, new InputFile(outfile, "sticker.png"), replyToMessageId: RawUpdate?.Message?.MessageId); await Bot.SendDocumentAsync(Chat.Id, new InputFile(outfile, "sticker.png"),
replyToMessageId: RawUpdate?.Message?.MessageId);
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
using Kruzya.TelegramBot.Core; using Kruzya.TelegramBot.Core;
namespace StickerTools; namespace West.TelegramBot.StickerTools;
public class StickerTools : Module public class StickerTools : Module
{ {
+7 -1
View File
@@ -1,9 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AssemblyName>TelegramBot.StickerTools</AssemblyName>
<RootNamespace>West.TelegramBot.StickerTools</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -14,4 +16,8 @@
<ProjectReference Include="..\..\Core\Core.csproj" /> <ProjectReference Include="..\..\Core\Core.csproj" />
</ItemGroup> </ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Delete Files="$(OutDir)\TelegramBot.dll" />
</Target>
</Project> </Project>