forked from Cog-Creators/Red-DiscordBot
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] [Stock Market] Add New Cog #554
Open
zach1502
wants to merge
42
commits into
SFUAnime:V3/testing
Choose a base branch
from
zach1502:V3/testing
base: V3/testing
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 30 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
84ddbd0
Stockmarket Cog
zach1502 ab356cd
Add files via upload
zach1502 5a1b2fd
Delete __init__.py
zach1502 7963d97
Delete constants.py
zach1502 99f14d3
Delete market.py
zach1502 558594b
Add files via upload
zach1502 d5b89da
Merge branch 'SFUAnime:V3/testing' into V3/testing
zach1502 d3a714f
Add files via upload
zach1502 10aa0e6
Add files via upload
zach1502 684e499
Add files via upload
zach1502 3fdee4e
Delete market.py
zach1502 059b0bb
Delete constants.py
zach1502 6bc2a81
Delete __init__.py
zach1502 7322630
undid Casino.py changes
zach1502 68a860c
Made code comply better with PEP8
zach1502 d53b19f
Merge pull request #1 from zach1502/zach1502-patch-1
zach1502 295ddbf
Merge branch 'SFUAnime:V3/testing' into V3/testing
zach1502 8199b96
[AfterHours] Added Type Hints
zach1502 4c1a2da
Merge pull request #2 from zach1502/type_hints
zach1502 3112f3b
Revert "Added Type hints"
zach1502 627c1d0
Merge pull request #3 from zach1502/revert-2-type_hints
zach1502 0d9f0c0
[AfterHours] Added Type Hints
zach1502 05b7f6c
Merge pull request #4 from zach1502/type_hints
zach1502 51a449f
Merge branch 'SFUAnime:V3/testing' into V3/testing
zach1502 abc1235
Cleaned up code and added type hints
zach1502 5804777
reverting irrelevant changes
zach1502 eac7c7c
reverting irrelevant changes
zach1502 d75560b
undoing irrelevant changes
zach1502 c66936f
conform to style
zach1502 f721397
Merge branch 'SFUAnime:V3/testing' into V3/testing
zach1502 3fd856d
Merge branch 'SFUAnime:V3/testing' into V3/testing
zach1502 c6a9b14
Implemented Suggested Changes
zach1502 bf07d12
Made File Paths Platform Agnostic
zach1502 29c5ea0
Fixed Formatting
zach1502 c8050dc
Merge branch 'SFUAnime:V3/testing' into V3/testing
zach1502 6a611df
Delete market.py
zach1502 af1f724
Delete constants.py
zach1502 9babac2
Delete info.json
zach1502 04ec193
Delete utils.py
zach1502 d50cd70
Delete __init__.py
zach1502 c63abef
Add files via upload
zach1502 04d1fd5
Merge pull request #5 from zach1502/removing-accidentally-placed-file…
zach1502 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .market import Market | ||
|
||
|
||
def setup(bot): | ||
bot.add_cog(Market(bot)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
"""Separate file for constants. Cause this takes up too much space.""" | ||
|
||
MAX_MSG_LENGTH = 1021 | ||
PRICE_MULTIPLIER = 100 | ||
BROKER_NAME = "Ren's Brokerage" | ||
DATA_FILE = "cogs\\stockmarket\\portfolios.json" | ||
EMBED_LOCATION = "cogs\\stockmarket\\chart.jpg" | ||
TRANSACTION_CANCELLED_STR = "Transaction cancelled!" | ||
INVALID_TICKER_STR = "Invalid ticker symbol!" | ||
INVALID_AMOUNT_STR = "Invalid amount!" | ||
POOR_STR = "You do not have enough money to buy this stock!" | ||
ACCOUNT_NOT_FOUND_STR = """No account found! Please create an account using `renmarket createacc`.""" # .format(get prefix somehow) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: No need for |
||
QUIPS = [ | ||
"Ready to Donate your money to Wall Street I see?", | ||
"AAAAAAAAAAND IT'S GONE!", | ||
"Diamond Hands. :raised_hands: :gem:", | ||
"Look, I swear I have a Securities License.", | ||
"I'm maybe not a real broker, but I can help you with that!", | ||
"Wow, did you learn that from r/wallstreetbets?", | ||
"Stocks are the only thing I would willingly buy high and sell low", | ||
"Pssst, I have insider information on this stock!", | ||
"Nothing brings me more joy than receiving dividends!", | ||
"I found out that I can manipulate stock market. Whatever I bought, it went red.", | ||
"The best way to earn a million dollars is to invest 10 million", | ||
"Let's talk about my retirement plan", | ||
"100% Not a pyramid scheme!", | ||
"Technical analysis is the Astrology of the stock market", | ||
'Look! the "Evergreen Forest" Formation is forming in the charts!', | ||
"BUY BUY BUY!", | ||
"SELL SELL SELL!", | ||
"Buying and holding for the long run is the best strategy!", | ||
"Oh! Tell me more about your NFT collection!", | ||
"Something about THIS stocks feels good!", | ||
"Started from the bottom now we're here!", | ||
"Learn to Invest!", | ||
"Short my stock, I shorten your life. :knife: :knife: :knife:", | ||
"Value or Growth stocks? :thinking:", | ||
"I still don't how the market works, and at this point I'm afraid to ask.", | ||
"I am a financial genious!", | ||
"Since I own this stock, you should buy it!", | ||
"The more you invest, the more I will earn!", | ||
"By the time you're old enough to retire, you'll have more money than you think!", | ||
"You're poorer than you think. ScotiaBank.", | ||
"APES TOGETHER STRONG", | ||
"Welcome back summoner!", | ||
"You can't find great value even if you were in a Walmart.", | ||
"Donate money to your rich local broker today", | ||
"Do you know why the European stock markets are sliding down?, Greece.", | ||
"How to be rich. Step 1: Take out student loans, Step 2: Invest in stocks, Step 3: Profit!", | ||
"Anything I say here is not financial advice, I'm ren, not your adviser.", | ||
"$GME go BRRRRRRRRRRRRRRRRRRRRRR", | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please make these paths platform-agnostic? This would work on Windows but not Linux.