mirror of
git://git.acid.vegas/scroll.git
synced 2024-11-25 09:36:38 +00:00
Added .ascii sync command to pull the latest art files
This commit is contained in:
parent
f5e769ece1
commit
4725e6710b
@ -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 <query>` | search for art diles that match \<query> |
|
||||
| `.ascii stop` | stop playing art |
|
||||
| `.ascii sync` | sync the ascii database to pump the newest art |
|
||||
|
||||
## Preview
|
||||
|
||||
|
@ -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]:
|
||||
|
Loading…
Reference in New Issue
Block a user