cleaned up main a little
This commit is contained in:
parent
da335bc3a5
commit
daf1bffcb6
1 changed files with 0 additions and 48 deletions
48
main.py
48
main.py
|
@ -134,51 +134,3 @@ keep_alive()
|
||||||
|
|
||||||
# run bot
|
# run bot
|
||||||
client.run(my_secret)
|
client.run(my_secret)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###############################
|
|
||||||
|
|
||||||
#from requests import Request, Session
|
|
||||||
#from requests.exceptions import ConnectionError, Timeout, TooManyRedirects
|
|
||||||
|
|
||||||
###############################
|
|
||||||
|
|
||||||
# crypto API
|
|
||||||
# def get_crypto():
|
|
||||||
# url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest'
|
|
||||||
# parameters = {
|
|
||||||
# 'start':'1',
|
|
||||||
# 'limit':'5000',
|
|
||||||
# 'convert':'USD'
|
|
||||||
# }
|
|
||||||
# headers = {
|
|
||||||
# 'Accepts': 'application/json',
|
|
||||||
# 'X-CMC_PRO_API_KEY': '5c96c638-c66f-4ddb-9c5d-7a77d5d83258',
|
|
||||||
# }
|
|
||||||
|
|
||||||
# session = Session()
|
|
||||||
# session.headers.update(headers)
|
|
||||||
|
|
||||||
# try:
|
|
||||||
# response = session.get(url, params=parameters)
|
|
||||||
|
|
||||||
|
|
||||||
# #res = response.json()
|
|
||||||
# #name = res['name']
|
|
||||||
# #id = res['id']
|
|
||||||
# #tags = res['tags']
|
|
||||||
# #crypto = discord.Embed(title = f'{id}\nMiniable: {tags}')
|
|
||||||
|
|
||||||
# json_data = json.loads(response.text)
|
|
||||||
# return(json_data)
|
|
||||||
# except (ConnectionError, Timeout, TooManyRedirects) as e:
|
|
||||||
# return(e)
|
|
||||||
|
|
||||||
################################
|
|
||||||
|
|
||||||
# crypto - *not working*
|
|
||||||
# elif message.content.lower().startswith("!crypto"):
|
|
||||||
# crypto = get_crypto()
|
|
||||||
# await message.channel.send(crypto)
|
|
||||||
|
|
Reference in a new issue