Search Results for

    Show / Hide Table of Contents

    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 Source

    ModuleContext(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 Source

    Client

    Telegram client that received update

    Declaration
    public ITelegramBotClient Client { get; }
    Property Value
    Type Description
    Telegram.Bot.ITelegramBotClient
    | Improve this Doc View Source

    CommandArgs

    Everything after command string Null if Action or Callback Query

    Declaration
    public string CommandArgs { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    CommandString

    Command string line '/test'

    Declaration
    public string CommandString { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Group

    Full name of module group. Null if handler not exists.

    Declaration
    public string Group { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    HandlerInfo

    CommandInfo, ActionInfo, StateInfo or CallbackQueryHandlerInfo instance. Null if handler not exists.

    Declaration
    public HandlerInfoBase HandlerInfo { get; }
    Property Value
    Type Description
    HandlerInfoBase
    | Improve this Doc View Source

    Module

    Circular reference to Module. Null if handler not exists.

    Declaration
    public TelegramModule Module { get; }
    Property Value
    Type Description
    TelegramModule
    | Improve this Doc View Source

    ModulesService

    ModulesService that executes current command or action

    Declaration
    public TelegramModulesService ModulesService { get; }
    Property Value
    Type Description
    TelegramModulesService
    | Improve this Doc View Source

    Update

    Received update

    Declaration
    public Update Update { get; }
    Property Value
    Type Description
    Telegram.Bot.Types.Update
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top
    TelegramModularFramework (c) 2022-2022
    ☀
    ☾