Provide a respond function
Closes https://git.autonomic.zone/decentral1se/xbotlib/issues/34.
This commit is contained in:
@ -626,3 +626,7 @@ class Bot(ClientXMPP):
|
||||
return self.reply(cleandoc(self.help), **kwargs)
|
||||
except AttributeError:
|
||||
return self.reply("No help found 🤔️", **kwargs)
|
||||
|
||||
def respond(self, response, content_type="text/html"):
|
||||
"""Send this response back with the web server."""
|
||||
return Response(response, content_type=content_type)
|
||||
|
||||
Reference in New Issue
Block a user