Skip to content

Commit

Permalink
fixed namespace (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbadung authored Sep 9, 2023
1 parent 285c17f commit 4e6209f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using PoliNetwork.Telegram.Bot.Functionality;
using PoliNetwork.Utility.Configuration;
using PoliNetwork.Utility.MessageContentControl;
using Telegram.Bot;
using Telegram.Bot.Types;
using PoliNetwork.Utility.MessageContentControl;

namespace PoliNetwork.Telegram.Bot.Functionality.Example
namespace Moderation.Bot.Functionality.Example
{
public class ResponseOnMessageFunctionality : AbstractTelegramBotFunctionality
{
Expand All @@ -23,10 +24,10 @@ public override async Task RunAsync(ITelegramBotClient bot, Update update, Cance
var username = message.Chat.Username;

var forbiddenWords = CreateForbiddenWordsArray();
var HasForbiddenWord = new ForbiddenWordsController(forbiddenWords).ContainsForbiddenWord(messageText);
var hasForbiddenWord = new ForbiddenWordsController(forbiddenWords).ContainsForbiddenWord(messageText);

var serverPrompt = $"Received a '{messageText}' message in chat {chatId} ({username}).";
var responseText = HasForbiddenWord ? "Your massage contains a forbidden word" : "Your message is a valid one";
var responseText = hasForbiddenWord ? "Your massage contains a forbidden word" : "Your message is a valid one";
Console.WriteLine(serverPrompt);

var sentMessage = await bot.SendTextMessageAsync(
Expand Down
4 changes: 2 additions & 2 deletions Moderation/Moderation/src/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using PoliNetwork.Telegram.Bot;
using Moderation.Bot.Functionality.Example;
using PoliNetwork.Telegram.Bot;
using PoliNetwork.Telegram.Bot.Functionality;
using PoliNetwork.Telegram.Bot.Functionality.Example;
using PoliNetwork.Telegram.Bot.Handler;
using PoliNetwork.Utility.ConfigurationLoader;
using PoliNetwork.Utility.Configuration;
Expand Down

0 comments on commit 4e6209f

Please sign in to comment.