1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Added a da list command

This commit is contained in:
Phxntxm 2017-03-11 21:35:56 -06:00
parent 9311ac78a6
commit 6007237f10

View file

@ -140,7 +140,7 @@ class Deviantart:
else:
await ctx.send("You are already subscribed to that user!")
@da.command(pass_context=True, name='unsub', aliases=['delete', 'remove', 'unsubscribe'])
@da.command(name='unsub', aliases=['delete', 'remove', 'unsubscribe'])
@utils.custom_perms(send_messages=True)
async def da_unsub(self, ctx, *, username):
"""This command can be used to unsub from the specified user
@ -159,6 +159,23 @@ class Deviantart:
else:
await ctx.send("You are not subscribed to that user!")
@da.command(name='list')
@utils.custom_perms(send_messages=True)
async def da_list(self, ctx):
"""Lists the artists you are subscribed to on DA
EXAMPLE: !da list
RESULT: Artist 1, Artist2, Artist 3"""
key = str(ctx.message.author.id)
content = await utils.get_content('deviantart', key)
if content is None or content['subbed'] is None:
await ctx.send("You are not subscribed to anyone at the moment!")
else:
fmt = ", ".join(content['subbed'])
await ctx.send("You are subscribed to:\n\n{}".format(fmt))
def setup(bot):
bot.add_cog(Deviantart(bot))