1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-23 22:27:27 +00:00

Fixed appending to None

This commit is contained in:
Myned 2017-10-17 23:32:32 -04:00
parent f76e4da5fc
commit f96d36be0e

View file

@ -53,11 +53,13 @@ class MsG:
for tag in tags:
tag_request = await u.fetch('https://e621.net/tag/related.json', params={'tags': tag, 'type': 'general'}, json=True)
for rel in tag_request.get(tag, [None]):
for rel in tag_request.get(tag, []):
related.append(rel[0])
await dest.send('`{}` **related tags:**\n```\n{}```'.format(tag, formatter.tostring(related)))
await asyncio.sleep(self.RATE_LIMIT)
related.clear()
await ctx.message.add_reaction('')
@ -79,6 +81,8 @@ class MsG:
await dest.send('`{}` **aliases:**\n```\n{}```'.format(tag, formatter.tostring(aliases)))
await asyncio.sleep(self.RATE_LIMIT)
aliases.clear()
await ctx.message.add_reaction('')