diff --git a/main.py b/main.py index 3d491a0..512a69b 100644 --- a/main.py +++ b/main.py @@ -126,6 +126,17 @@ async def del_tag(msg: Message): await msg.reply(f'Tag {args} removed') +@dp.message_handler(commands=['del']) +async def del_command(msg: Message): + args = msg.get_args() + if not args: + await msg.reply('Please provide tag to subscribe to') + return + for tag in args.split(): + await redis.srem('e621:subs', tag) + await msg.reply(f'Tags {args} removed') + + @dp.message_handler(commands=['list']) async def list_tags(msg: Message): tags = [t.decode() for t in await redis.smembers('e621:subs')]