telegramlib.controllers_command

telegramlib.controllers_command(func)[source]

Decorator to restrict command execution to users listed as controllers.

This decorator allows only users identified as controllers in the bot’s configuration to execute the decorated function. Controllers have a higher level of access compared to regular users but less than the admin.

Parameters:

func (function) – The function to be wrapped and executed only by controllers.

Returns:

wrapper – The wrapped function with controller check applied.

Return type:

function