57 Commits

Author SHA1 Message Date
Florian Zevedei
7aa40b3e2d Using Message instead RawData.Message on session creation 2024-07-10 14:25:51 +02:00
Florian Zevedei
834038ff44 Adding additional bot command checks toa void invalid configurations 2024-06-09 14:13:43 +02:00
Florian Zevedei
a7411176e6 Fixing the prototype solution of group commands detection 2024-05-29 21:29:14 +02:00
Florian Zevedei
b829f43c5d Adding a exception for invalid ServiceProviders #62
- adding an internal exception handler to catch InvalidOperationException and throw a new explicit one
2024-03-10 17:09:13 +01:00
Florian Zevedei
b20b3b2826 Bugfix, adding missing DeviceSession to UpdateResult 2024-01-24 22:12:26 +01:00
ZavaruKitsu
fb51677429 refactor: make properties readonly 2022-10-15 19:01:29 +03:00
ZavaruKitsu
77242a200f upstream: apply changes 2022-10-15 18:16:22 +03:00
ZavaruKitsu
f9d25dfb83 fix!: prevent exceptions from being muted
happens by not awaiting tasks
2022-10-08 20:00:21 +03:00
ZavaruKitsu
f41fdf90ed fix!: get rid of async void 2022-10-08 19:37:00 +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
16371b8c7a #26 Fix error on using InvokeMessageLoop
- Fixes the error on using the default InvokeMessageLoop with Deviceid
2022-09-01 13:49:26 +02:00
FlorianDahn
78b3fbebc8 MessageLoop updates
- moving MessageLoop folders from Subfolder Factories one level up
- changing namespace and botbuilder methods to change
- adding FullMessageLoop which allows to get all updates (like MinimalMessageLoop but with all methods)
2022-06-06 20:16:33 +02:00
FlorianDahn
707ffd492f Upgrading BotCommands to new BotCommandScope format
- adding IsKnownBotCommand method to BotBase
- updated UploadBotCommand method to new format
- adding new Commandformat to BotBaseBuilder
- adding AddChatCommand and ClearChatCommand for custom Chat commands
- integrating new checks into FormBaseMessageLoop
2022-05-15 23:20:16 +02:00
FlorianDahn
4f85677deb Comment Cleanup 2022-01-05 18:39:06 +01:00
FlorianDahn
ca1c382924 Removing old commented stuff 2022-01-04 23:44:43 +02:00
FlorianDahn
584bb76e0f Adding comments 2022-01-04 23:42:13 +02: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
a22ede0f4f Changing BotBase behaviour to fluent api
- removing unecessary constructors from BotBase
- removing generics from BotBase
- removing generics from SessionBase
- adding StartFormFactory interface
- adding DefaultStartFormFactory
- adding multiple methods to BotBaseBuilder
2021-10-17 17:25:17 +02:00
Xilosof
5dcbe04a73 Added initialization of MaxNumberOfRetries setting 2021-03-14 22:03:13 +03:00
FlorianDahn
72d94df907 FIX: new message loop will now correctly manage events and form switches 2021-03-01 22:14:36 +01:00
FlorianDahn
42b624c28f Fix for MessageType use when no Message is available 2021-02-28 18:22:08 +01:00
FlorianDahn
f5e26924d8 Adding InvokeMessageLoop method
- For asyncronous form updates adding InvokeMessageLoop
2021-02-28 17:45:28 +01:00
FlorianDahn
884aa60fac Joining both message loops for easier maintainability 2021-02-28 17:44:35 +01:00
FlorianDahn
4336ff1681 Session Updates 2020-12-04 17:19:11 +01:00
FlorianDahn
c2e33da277 Adding SaveSessionState to SessionBase
Feature request: https://github.com/MajMcCloud/TelegramBotFramework/issues/2
2020-11-22 23:15:31 +01:00
FlorianDahn
b37c31f2bd Update BotBase.cs
- Bugfix, Unhandled actions has been producing a loop
2020-10-20 19:10:30 +02:00
FlorianDahn
5e87d00c58 Localization updates
- small localization updates
- correction in enumration from safe to save
2020-04-21 21:50:59 +02:00
FlorianDahn
efe5fef7d0 Adding setting for automated session serialization on shutdown
- adding automated session serialization on application ending (console or shutdown/logoff)
- adding console class for managing system events
2020-04-21 21:45:21 +02:00
FlorianDahn
992065d289 Update BotBase.cs
- improving system settings for bot
2020-04-21 21:43:25 +02:00
FlorianDahn
2c3e707673 Session serialization update
- updating Session serialization for using new method GetChatTitle() to get the chat title for debugging purposes
- removing unncessary use of getting the chat title at every call (improving performance)
2020-04-15 20:30:42 +02:00
FlorianDahn
a1b3b9246b Update BotBase.cs
fixing new command handling
2020-04-11 19:42:24 +02:00
FlorianDahn
b74233d66d Update BotBase.cs
Small fix
2020-04-11 19:24:31 +02:00
FlorianDahn
fb7b624ad8 BotCommands and refactoring
- refactoring SystemCalls to BotCommand (due new Telegram Bot update)
- Adding UploadBotCommands method to BotBase
- refactoring and simplifying BotBase constructors
- adding getBotCommands and SetBotCommands to MessageClient
2020-04-11 19:12:34 +02:00
FlorianDahn
fd6f6fef34 - moving LoadSessionStates and SaveSessionStates from BotBase to SessionBase 2020-04-09 11:18:23 +02:00
FlorianDahn
f80fda8ff9 More Attributes for Serialization
- adding IgnoreState Attribute to make it easier to skip forms on session serialization
2020-04-05 23:46:33 +07:00
FlorianDahn
8b66842d34 Update BotBase.cs
- prevent BotBase from crashing on  loading serialized sessions
2020-04-05 23:31:37 +07:00
FlorianDahn
0cdb8c3a1a Adding StateMachine for Session serialization
- adding multiple classes and interfaces for Session Serialization and recovery after restart
2020-04-05 13:13:11 +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
fba922049f Updates and fixes
- adding IsFirstHandler to allow controls to skip Actions which has been invoked already (i.e. due to navigation)
- adding Hidden method to ButtonGrid to fix re-rendering Buttons after opening a Modal form and comming back
- improving and fixing the Cleanup method for ButtonGrid to prevent "Keyboard jumping" for ReplyKeyboard on mobile devices.
- renaming some old *Result objects to *EventArgs for more clear definitions
2020-03-25 12:37:16 +07:00
FlorianDahn
8e6de4a0e1 - Refactoring and moving all EventArgs structures to folder Args 2020-03-23 13:02:31 +07:00
FlorianDahn
4c8b085655 - small cleanup 2019-09-27 23:14:28 +02:00
FlorianDahn
256cac825f - adding Load method for controls 2019-09-26 20:50:33 +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
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
2f7ded8ce5 - added constructor for adding custom config of TelegramBotClient
- added Log all messages to Action events
2019-03-20 22:21:10 +07:00
FlorianDahn
c6666f72bc - Improvements to system calls
- system calls now async with await
- added start command to example
- added "handled" property to system call event args
2019-03-20 16:57:10 +07:00
FlorianDahn
da80af86e3 Small fix in Systemcall management 2019-03-20 13:44:44 +07:00