Class ModuleContext
Object which contains context for module
Inheritance
System.Object
ModuleContext
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: TelegramModularFramework.Modules
Assembly: TelegramModularFramework.dll
Syntax
public class ModuleContext
Constructors
| Improve this Doc View SourceModuleContext(ITelegramBotClient, TelegramModulesService, Update, String, String, String, TelegramModule, HandlerInfoBase)
Declaration
public ModuleContext(ITelegramBotClient client, TelegramModulesService modulesService, Update update, string args, string commandString, string group, TelegramModule module, HandlerInfoBase info)
Parameters
| Type | Name | Description |
|---|---|---|
| Telegram.Bot.ITelegramBotClient | client | |
| TelegramModulesService | modulesService | |
| Telegram.Bot.Types.Update | update | |
| System.String | args | |
| System.String | commandString | |
| System.String | group | |
| TelegramModule | module | |
| HandlerInfoBase | info |
Properties
| Improve this Doc View SourceClient
Telegram client that received update
Declaration
public ITelegramBotClient Client { get; }
Property Value
| Type | Description |
|---|---|
| Telegram.Bot.ITelegramBotClient |
CommandArgs
Everything after command string Null if Action or Callback Query
Declaration
public string CommandArgs { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
CommandString
Command string line '/test'
Declaration
public string CommandString { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Group
Full name of module group. Null if handler not exists.
Declaration
public string Group { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
HandlerInfo
CommandInfo, ActionInfo, StateInfo or CallbackQueryHandlerInfo instance. Null if handler not exists.
Declaration
public HandlerInfoBase HandlerInfo { get; }
Property Value
| Type | Description |
|---|---|
| HandlerInfoBase |
Module
Circular reference to Module. Null if handler not exists.
Declaration
public TelegramModule Module { get; }
Property Value
| Type | Description |
|---|---|
| TelegramModule |
ModulesService
ModulesService that executes current command or action
Declaration
public TelegramModulesService ModulesService { get; }
Property Value
| Type | Description |
|---|---|
| TelegramModulesService |
Update
Received update
Declaration
public Update Update { get; }
Property Value
| Type | Description |
|---|---|
| Telegram.Bot.Types.Update |