cleaned up main a little

This commit is contained in:
Sid 2022-02-24 12:10:24 +01:00 committed by GitHub
parent da335bc3a5
commit daf1bffcb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

48
main.py
View file

@ -134,51 +134,3 @@ keep_alive()
# run bot
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)