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
5
main.py
5
main.py
|
@ -99,9 +99,10 @@ async def watch(ctx, stock, est_price: typing.Optional[int]):
|
||||||
|
|
||||||
|
|
||||||
@bot.command(aliases=['uw'])
|
@bot.command(aliases=['uw'])
|
||||||
async def unwatch(ctx, stock):
|
async def unwatch(ctx, *stocks):
|
||||||
user = str(ctx.message.author)
|
user = str(ctx.message.author)
|
||||||
stock = stock.upper()
|
stocks = [stock.upper() for stock in stocks]
|
||||||
|
for stock in stocks:
|
||||||
database.unwatch(user, stock)
|
database.unwatch(user, stock)
|
||||||
return await ctx.send("Updated watchlist")
|
return await ctx.send("Updated watchlist")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue