mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[sticker-tools] add to dockerfile, adjust project configuration
Co-authored-by: voed <voed@i.ua>
This commit is contained in:
@@ -18,6 +18,7 @@ COPY ./modules/Reputation/*.csproj ./modules/Reputation/
|
||||
COPY ./modules/ContentStore/*.csproj ./modules/ContentStore/
|
||||
COPY ./modules/DebugTools/*.csproj ./modules/DebugTools/
|
||||
COPY ./modules/CodeWatcher/*.csproj ./modules/CodeWatcher/
|
||||
COPY ./modules/StickerTools/*.csproj ./modules/StickerTools/
|
||||
RUN dotnet restore Kruzya.TelegramBot.sln
|
||||
|
||||
# Copy all project files
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
using BotFramework.Attributes;
|
||||
using BotFramework.Enums;
|
||||
using SixLabors.ImageSharp;
|
||||
using Telegram.Bot.Types.Enums;
|
||||
using Telegram.Bot;
|
||||
using Telegram.Bot.Types;
|
||||
using Telegram.Bot.Types.Enums;
|
||||
|
||||
namespace StickerTools;
|
||||
namespace West.TelegramBot.StickerTools;
|
||||
|
||||
public class Handler : BotEventHandler
|
||||
{
|
||||
@@ -30,7 +30,7 @@ public class Handler : BotEventHandler
|
||||
using var outfile = new MemoryStream();
|
||||
await img.SaveAsPngAsync(outfile);
|
||||
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,6 +1,6 @@
|
||||
using Kruzya.TelegramBot.Core;
|
||||
|
||||
namespace StickerTools;
|
||||
namespace West.TelegramBot.StickerTools;
|
||||
|
||||
public class StickerTools : Module
|
||||
{
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AssemblyName>TelegramBot.StickerTools</AssemblyName>
|
||||
<RootNamespace>West.TelegramBot.StickerTools</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -14,4 +16,8 @@
|
||||
<ProjectReference Include="..\..\Core\Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Delete Files="$(OutDir)\TelegramBot.dll" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user