Can now unwatch multiple stocks at once by separating with spaces
This commit is contained in:
parent
0268503cad
commit
b0d47dbbe1
1 changed files with 4 additions and 3 deletions
7
main.py
7
main.py
|
@ -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")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue