fixed dominos joke
This commit is contained in:
@@ -5,6 +5,7 @@ nltk
|
|||||||
python-dotenv
|
python-dotenv
|
||||||
|
|
||||||
# stockquotes
|
# stockquotes
|
||||||
|
yfinance
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
requests
|
requests
|
||||||
lxml
|
lxml
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ import logging
|
|||||||
import re
|
import re
|
||||||
from random import choice
|
from random import choice
|
||||||
|
|
||||||
# from nextcord import Client, Message
|
import yfinance as yf
|
||||||
# from nextcord import utils
|
|
||||||
from discord import Client, Message, utils
|
from discord import Client, Message, utils
|
||||||
|
|
||||||
from . import base, helpers
|
from . import base, helpers
|
||||||
@@ -95,7 +94,7 @@ class DominosJoke(base.Joke):
|
|||||||
return re.compile('domino\'?s', re.IGNORECASE)
|
return re.compile('domino\'?s', re.IGNORECASE)
|
||||||
|
|
||||||
async def respond(self, message: Message, client: Client, match: re.Match):
|
async def respond(self, message: Message, client: Client, match: re.Match):
|
||||||
cp = helpers.get_stock_price('DPZ')
|
cp = yf.Ticker('DPZ').basic_info['lastPrice']
|
||||||
msg = f'You know, my friend Nick has made about ${cp - 16:.0f} on Domino\'s stock. He basically owns it now'
|
msg = f'You know, my friend Nick has made about ${cp - 16:.0f} on Domino\'s stock. He basically owns it now'
|
||||||
await message.add_reaction('\U0001F355')
|
await message.add_reaction('\U0001F355')
|
||||||
await message.reply(msg)
|
await message.reply(msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user