diff --git a/README.md b/README.md index 5152ac2..6e23a7e 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ All of the IRC art is loaded directly from the [@ircart/ircart](https://github.c | `.ascii random [dir]` | play random art, optionally from the [dir] directory only | | `.ascii search ` | search for art diles that match \ | | `.ascii stop` | stop playing art | +| `.ascii sync` | sync the ascii database to pump the newest art | ## Preview diff --git a/scroll.py b/scroll.py index d63a930..72cc4be 100644 --- a/scroll.py +++ b/scroll.py @@ -127,6 +127,7 @@ class Bot(): self.db[dir] = self.db[dir]+[name,] if dir in self.db else [name,] else: self.db['root'] = self.db['root']+[item,] if 'root' in self.db else [item,] + await self.sendmsg(connection.channel, bold + color('database synced', light_green)) except Exception as ex: try: await self.irc_error(connection.channel, 'failed to sync database', ex) @@ -245,6 +246,8 @@ class Bot(): await asyncio.sleep(throttle.message) else: await self.irc_error(chan, 'no results found', query) + elif msg == '.ascii sync': + await self.sync() elif len(args) == 2: option = args[1] if [x for x in ('..','?','%','\\') if x in option]: