mirror of
https://gitlab.com/simple-stock-bots/simple-discord-stock-bot.git
synced 2025-06-16 15:17:29 +00:00
Fixed bug where !news didn't work if capitalization wasnt perfect
This commit is contained in:
parent
99dfdc573a
commit
602a1aff19
@ -28,7 +28,7 @@ async def on_message(message):
|
|||||||
|
|
||||||
# define information about the message
|
# define information about the message
|
||||||
author = message.author
|
author = message.author
|
||||||
content = message.content
|
content = message.content.lower()
|
||||||
channel = message.channel
|
channel = message.channel
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -46,7 +46,8 @@ async def on_message(message):
|
|||||||
try: # checks if data is a valid ticker, if it is not tells the user
|
try: # checks if data is a valid ticker, if it is not tells the user
|
||||||
nameTicker = data[ticker.upper()]['name']
|
nameTicker = data[ticker.upper()]['name']
|
||||||
priceTicker = data[ticker.upper()]['price']
|
priceTicker = data[ticker.upper()]['price']
|
||||||
if message.content.startswith('!news'):
|
|
||||||
|
if content.startswith('!news'):
|
||||||
embed = displayembed(ticker, nameTicker, priceTicker)
|
embed = displayembed(ticker, nameTicker, priceTicker)
|
||||||
await client.send_message(channel, embed=embed)
|
await client.send_message(channel, embed=embed)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user