progval / Supybot-plugins

Collection of plugins for Supybot/Limnoria I wrote or forked.
https://github.com/ProgVal/Limnoria/
107 stars 63 forks source link

Stocks: accept multiple symbols at once #331

Closed dubcheck closed 4 years ago

dubcheck commented 4 years ago

Example:

<dubcheck> stock USDEUR DJI MSFT AAPL
-chujbot- USDEUR 0.9311 ▲ 0.0233 (2.5655%) | DJIA 19898.9 ▼ -1338.46 (-6.3024%) | MSFT 140.4 ▼ -6.17 (-4.2096%) | AAPL 246.67 ▼ -6.19 (-2.448%)
<dubcheck> stock eurrub
-chujbot- EURRUB 87.0498 ▲ 4.2869 (5.1797%)
<dubcheck> config plugins.Stocks.alphavantage.maxsymbols 3
-chujbot- The operation succeeded.
<dubcheck> stock USDEUR DJI MSFT AAPL
-chujbot- Error: Too many symbols. Maximum count 3. Your count: 4
<dubcheck> stock USDEUR DJI MSFT INVALID
-chujbot- Error: Too many symbols. Maximum count 3. Your count: 4
<dubcheck> stock USDEUR DJI INVALID
-chujbot- Error: 'INVALID' is not a valid symbol.
<dubcheck> stock USDEUR DJI NYSE
-chujbot- Error: NYSE: Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for GLOBAL_QUOTE.