Skip to content

Commit

Permalink
Console: added /reaction
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz0u committed Aug 6, 2024
1 parent d7696bf commit d2959fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Console/Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Telegram.Bot" Version="21.7.1" />
<ProjectReference Include="..\..\Telegram.Bot\src\Telegram.Bot\Telegram.Bot.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ await bot.SendTextMessageAsync(msg.Chat, """
/keyboard - send keyboard buttons
/remove - remove keyboard buttons
/poll - send a poll
/reaction - send a reaction
""", parseMode: ParseMode.Html, linkPreviewOptions: true,
replyMarkup: new ReplyKeyboardRemove()); // also remove keyboard to clean-up things
break;
Expand Down Expand Up @@ -99,6 +100,9 @@ await bot.SendTextMessageAsync(msg.Chat, """
case "/poll":
await bot.SendPollAsync(msg.Chat, "Question", ["Option 0", "Option 1", "Option 2"], isAnonymous: false, allowsMultipleAnswers: true);
break;
case "/reaction":
await bot.SetMessageReactionAsync(msg.Chat, msg.MessageId, ["❤"], false);
break;
}
}

Expand Down

0 comments on commit d2959fc

Please sign in to comment.