Ver código fonte

Fix bug with attachment returns

Kirk Trombley 4 anos atrás
pai
commit
60a9344174
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      lib/rollbot/decorators/as_command.py

+ 1 - 1
lib/rollbot/decorators/as_command.py

@@ -82,7 +82,7 @@ def _make_response(message: Message, result: Any) -> Response:
     if isinstance(result, str):
         return Response.from_message(message, text=result)
     if isinstance(result, Attachment):
-        return Response.from_message(message, attachments=[Attachment])
+        return Response.from_message(message, attachments=[result])
     return Response.from_message(message, text=str(result))