Browse Source

adding descriptions to all the functions

master
manetta 4 years ago
parent
commit
ccd695c462
  1. 5
      LogBot/logbot.py

5
LogBot/logbot.py

@ -53,6 +53,7 @@ class Logbot(Bot):
) )
def _download(self, message): def _download(self, message):
"""Download media files."""
# define media_type # define media_type
if message.url.lower().endswith(self.IMAGE_TYPES): if message.url.lower().endswith(self.IMAGE_TYPES):
media_type = "images" media_type = "images"
@ -153,6 +154,7 @@ class Logbot(Bot):
self.log.info(f"Copied stylesheet.css to: { room }") self.log.info(f"Copied stylesheet.css to: { room }")
def setup(self): def setup(self):
"""Setup a log for all the rooms LogBot is subscribed to."""
self.log.info(f"Output folder is set to: { self.output }") self.log.info(f"Output folder is set to: { self.output }")
for room in self.rooms: for room in self.rooms:
self._setup_room(room) self._setup_room(room)
@ -165,8 +167,7 @@ class Logbot(Bot):
self._setup_room(str(message["from"])) self._setup_room(str(message["from"]))
def group(self, message): def group(self, message):
"""All the things LogBot does when it receives a group message."""
# to debug in the terminal
self.log.info("------------------") self.log.info("------------------")
self.log.info(f"message: {message.text}") self.log.info(f"message: {message.text}")
self.log.info(f"room: {message.room}") self.log.info(f"room: {message.room}")

Loading…
Cancel
Save