Improve command help and don't allow management commands if the AS bot is not in the room
This commit is contained in:
@@ -153,7 +153,12 @@ class MatrixHandler:
|
||||
if message["msgtype"] != "m.text":
|
||||
return
|
||||
|
||||
is_management = len(self.az.intent.get_room_members(room)) == 2
|
||||
try:
|
||||
is_management = len(self.az.intent.get_room_members(room)) == 2
|
||||
except MatrixRequestError:
|
||||
# The AS bot is not in the room.
|
||||
return
|
||||
|
||||
if is_command or is_management:
|
||||
try:
|
||||
command, arguments = text.split(" ", 1)
|
||||
|
||||
Reference in New Issue
Block a user