Added dynamic scope chat_id for owner
This commit is contained in:
@@ -139,6 +139,10 @@ class PyroClient(Client):
|
||||
# Make flat key a dict again
|
||||
scope_dict = loads(scope)
|
||||
|
||||
# Replace "owner" in the bot scope with owner's id
|
||||
if "chat_id" in scope_dict and scope_dict["chat_id"] == "owner":
|
||||
scope_dict["chat_id"] = self.owner
|
||||
|
||||
# Create object with the same name and args from the dict
|
||||
try:
|
||||
scope_obj = globals()[scope_dict["name"]](
|
||||
|
Reference in New Issue
Block a user