53 Commits

Author SHA1 Message Date
FlorianDahn
0700e1e1ba Fixing class renaming of TelegramBot framework 18 to 19 2023-09-09 18:49:52 +02:00
ZavaruKitsu
9400cfc74e refactor: rename MaxLengthException & fix naming 2022-10-15 21:59:12 +03:00
ZavaruKitsu
77242a200f upstream: apply changes 2022-10-15 18:16:22 +03:00
ZavaruKitsu
5ab15621a0 fix: reformat using C# rules 2022-10-08 19:26:34 +03:00
ZavaruKitsu
a731e2a8d0 fix: some build & linter warnings 2022-10-08 19:15:51 +03:00
FlorianDahn
df7880fcf3 Make OnMessageSent async as well 2022-07-02 14:07:25 +02:00
FlorianDahn
e81f535f75 New methods for SendingVideo
- adding SendVideo by byte array
- adding SendLocalVideo to send videofile from disk
2022-05-15 15:42:53 +02:00
FlorianDahn
72a1fa3c99 Replacing Client in ResultBase and subclasses
- replace Client with Device to allow more access
- making Client in DeviceSession public to allow access from outside
2022-05-15 15:41:24 +02:00
FlorianDahn
c5fa153d54 Replace KickChatMemberAsync/KickUser 2022-01-04 23:40:33 +02:00
FlorianDahn
e28663138b Integrating Images Project 2021-11-28 23:20:56 +01:00
FlorianDahn
31e52887ba V17 - Big Update
- Adding a message loop interface to build custom message loops
- extracting default message loop from BotBase into seperate class
- updates to BotBaseBuilder for integration of custom message loops
- updating all result classes for using the new Update object of V17
- improving MessageResult and UpdateResult classes
- BotBase has been prepared for cleanup (a lot of comments)
- Comment cleanup at the next build
- updating Readme
2021-11-26 17:57:49 +01:00
FlorianDahn
e9c25ea9e4 New ConfirmAction method 2021-11-26 17:49:33 +01:00
FlorianDahn
2aee486370 V17 - Replacing default enum values 2021-11-26 17:49:17 +01:00
FlorianDahn
e0ec133209 AutoCleanForm FIX
- adding MessageDeleted event to AutoCleanForm for catching messages getting deleted outside of AutoCleanForm
- added OnMessageDelete invoke to DeleteMessage in DeviceSession
2021-10-01 18:35:05 +02:00
FlorianDahn
5613e84bc3 Updating to TelegramBotFramework 16.0.2
ATTENTION: UserIds will no longer be "int", instead it has to be of the long datatype
- updating DeviceSession methods for new datatype
- updating LinkReplaceTest class example
- adding .NET 5 as target framework
2021-07-17 18:34:27 +02:00
Xilosof
e742ded371 Change exception handling when sending a request.
1) Now RetryAfter  is multiplied by 1000, because request contains value in second instead milliseconds. (see https://core.telegram.org/bots/api#responseparameters)
2) Now calls occur in a loop, but a limited number of times. This also ensures that exceptions are caught during a repeated request.
2021-03-14 22:00:51 +03:00
Xilosof
706b0f522a Add static propert MaxNumberOfRetries.
This is necessary so that the DeviceSession instance can get this setting. There is no direct access to the settings in BotBase at the moment.
This property will be set when calling the Start method for the bot and is the same for all bots in the same application.
2021-03-14 21:55:07 +03:00
FlorianDahn
26c4f479fa New internal MessageDeleted event handler for better control and form use. 2021-03-01 22:50:42 +01:00
FlorianDahn
fc44b7d38c New Control: MultiView
- adding basic paging options
- adding GetOrigin method to find control or form who has sent a message
- adding Test for MultiView
2021-02-20 01:51:01 +01:00
FlorianDahn
80d43ac369 Update DeviceSession.cs 2021-01-15 19:36:13 +01:00
FlorianDahn
a524fef0d5 Update DeviceSession.cs
Workaround: Unknown API differences
2020-12-23 03:09:47 +01:00
FlorianDahn
73ba36ea2b Optimization of API calls within DeviceSession
- replacing all API calls with new method "API" to cover APIRequestExceptions
- adding IDeviceSession interface for future use
- adding "API" method without result
2020-12-22 21:55:47 +01:00
FlorianDahn
87690a3630 Update DeviceSession.cs
Adding a feature for making future API calls.
2020-12-22 15:37:05 +01:00
FlorianDahn
4336ff1681 Session Updates 2020-12-04 17:19:11 +01:00
FlorianDahn
f24c309f63 Update DeviceSession.cs
- adding ParseMode to Edit functions
- adding a Send method which the parameter of the DeviceId
2020-10-22 22:14:40 +02:00
FlorianDahn
2c34a178ee Update DeviceSession.cs
- adding caption parameter
2020-10-12 23:16:42 +02:00
FlorianDahn
8ef8733a2b Update DeviceSession.cs
- Adding the name parameter to SendPhoto methods
- Adding caption parameter to SendVideo methods
2020-10-05 14:21:57 +02:00
FlorianDahn
c00c2e8d8f Update DeviceSession.cs
- adding Unban method
2020-07-25 15:08:55 +02:00
FlorianDahn
ef667d12d8 Update DeviceSession.cs
- adding EditReplyMarkup to Device methods
- adding GetChatTitle method to get easier the name of a chat/group/channel
- some cleanup
2020-04-15 20:27:46 +02:00
FlorianDahn
2ed030b2fb - adding MarkdownV2 escape function
- adding MarkdownV2 autoescape feature
2020-04-09 11:57:45 +02:00
FlorianDahn
0435c68281 Update DeviceSession.cs
DeviceSession: Removing unused ex variable in Exceptions
2020-04-02 12:39:48 +07:00
FlorianDahn
6a62d73fe0 Adding Edited Features
- FormBase: adding Edited method
- MessageClient: adding MessageEdit event
- GroupForm: adding Edited method
- DeviceSession: adding ChatTitle
2020-04-02 12:37:53 +07:00
FlorianDahn
78a412c630 - simplify function returns and improving memory use 2020-03-28 10:58:25 +07:00
FlorianDahn
7a7014cec3 - adding SendTextFile to simplify sending csv or textfiles by code without saving them to harddrive 2020-03-28 10:55:32 +07:00
FlorianDahn
8e6de4a0e1 - Refactoring and moving all EventArgs structures to folder Args 2020-03-23 13:02:31 +07:00
FlorianDahn
5b38f2e1e2 - adding sendvideo to device for videos or gifs 2019-12-04 01:29:22 +01:00
FlorianDahn
a08ba8f512 -update on FormBase which should prevent issues on control management 2019-12-02 03:46:40 +01:00
FlorianDahn
85a479d826 - adding useful tasks for groups 2019-11-23 02:40:25 +01:00
FlorianDahn
94195ec5bf - added another Edit Method for InlineKeyboardMarkup
- change Send method parameter ReplyKeyboardMarkup to ReplyMarkupBase to allow also RemoveKeyboard
2019-09-26 20:51:30 +02:00
FlorianDahn
703c99eb8d - added a custom exception for maximum length messages, saves to time to sent to API
- added a constants file, for have constants to work with
- catching maximum message length
2019-09-17 16:43:02 +02:00
FlorianDahn
e4da70d37d - Update of FormBase for better async event management
- Update of ControlBase for partial rendering options
- Updating serveral base classes to better asyc event management
- separating Enums into different folder
- some small bug fixes
- removed "CustomEventManagement" cause it doesnt make sense now
2019-07-14 22:22:04 +02:00
FlorianDahn
fe1aafc9a5 - added IsDisposed to form
- removed FormSwitched from FormBase and added to DeviceSession (more logical message loop)
- added PreviousForm to DeviceSession, contains last opened form (at initial form is null)
-BotBase message loop update
- now navigation is possible from every form, not just the latest ones as before
2019-06-22 15:15:29 +02:00
FlorianDahn
ea971979e2 - Added comments
- added Edit method
2019-05-04 18:59:05 +02:00
FlorianDahn
4f1eae543d - adding Delete Options for Both sides to AutoCleanForm
- general Performance improvements
- Adding MessageReceived Event to DeviceSession, will be called before "message loop"
- AutoCleanForm optimized and clean process added to public function MessageCleanup (so you could call on your own)
- IsGroup for DeviceSession fixed to correct test
- IsChannel added to DeviceSession

Examples:
- SimpleForm (#1) derived now from AutoCleanForm to show deletion mode for both sides
2019-05-04 16:32:48 +02:00
FlorianDahn
b14fa2dc87 - adding new SentData Event in FormBase for User uploads (for Photo, Audio, Video, Contact, Location, Document)
- adding RequestUserLocation and RequestUserContact to Device class
- Update to Device class
- updating examples
- adding example for data upload
- small documentary Updates (Readme.md)
2019-03-27 14:01:48 +07:00
FlorianDahn
fb68da6ab1 - added request contact to DeviceSession
- added request location to DeviceSession
2019-03-20 22:24:00 +07:00
FlorianDahn
bbf90deccc - Added easy to use Proxy functionality into constructor
- improved DeviceSession
- added IsGroup property to DeviceSession
2019-03-20 11:14:38 +07:00
FlorianDahn
aa53dc9386 - adding a lot of english translations
- switching german to english
- some bug fixes in device sessions and improvements
- adding xml documentation
2019-02-22 16:35:35 +01:00
FlorianDahn
04d7a52921 Issue fixed for no Raw message Result and Device Session extended 2019-02-19 19:20:01 +01:00
FlorianDahn
be19bbec5d - Adding a progress bar control
- Adding a control base class
- Adding an option to log all incomming messages with an event handler
- Some necessary added try/catch stuff to catch exceptions for "blocked" Bots, to prevent crashing
- Added some progress bar Test to Testproject
2018-10-14 02:26:50 +02:00