Can now unwatch multiple stocks at once by separating with spaces

This commit is contained in:
socks 2021-02-16 23:36:53 +00:00
parent 0268503cad
commit b0d47dbbe1

View file

@ -99,10 +99,11 @@ async def watch(ctx, stock, est_price: typing.Optional[int]):
@bot.command(aliases=['uw'])
async def unwatch(ctx, stock):
async def unwatch(ctx, *stocks):
user = str(ctx.message.author)
stock = stock.upper()
database.unwatch(user, stock)
stocks = [stock.upper() for stock in stocks]
for stock in stocks:
database.unwatch(user, stock)
return await ctx.send("Updated watchlist")