From 8022b0cbe0c4c3054f782a8c13c8d685be53c177 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Fri, 29 Sep 2023 13:42:04 -0700 Subject: [PATCH] get rid of /nft --- app/cogs/cheeky_functions.py | 8 -------- app/nft.py | 28 ---------------------------- 2 files changed, 36 deletions(-) delete mode 100755 app/nft.py diff --git a/app/cogs/cheeky_functions.py b/app/cogs/cheeky_functions.py index 75879133..70c26a1e 100755 --- a/app/cogs/cheeky_functions.py +++ b/app/cogs/cheeky_functions.py @@ -207,14 +207,6 @@ class Cheeky(commands.Cog): await ctx.respond(file=discord.File(file_path + ".mp3")) os.remove(file_path + ".mp3") - @commands.slash_command(guild_ids=None, name="nft", description="Returns an nft") - async def nft(self, ctx: commands.Context): - import nft - - result = nft.get_nft() - - await ctx.respond(result) - @commands.slash_command( guild_ids=None, name="8ball", description="Ask the magic 8 ball a question" ) diff --git a/app/nft.py b/app/nft.py deleted file mode 100755 index 40664920..00000000 --- a/app/nft.py +++ /dev/null @@ -1,28 +0,0 @@ -import requests -import random - - -def get_nft(): - # To find the collection's address, you have to do a curl against the API - # curl -s --request GET --url https://api.opensea.io/api/v1/collection/ | | jq -r .[].primary_asset_contracts[].address - # Alternatively, go to some asset on Opensea and take the chunk of the URL after "assets": - # https://opensea.io/assets/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/1469 - # In this case, "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" - collections = [ - "0x1981cc36b59cffdd24b01cc5d698daa75e367e04", # Crypto Chicks - "0x5180db8f5c931aae63c74266b211f580155ecac8", # Crypto Coven - "0x54a79ab6f5210fcb2c5fc914271a865003f15576", # Panda Astronaut Club - "0x8943c7bac1914c9a7aba750bf2b6b09fd21037e0", # Lazy Lions - "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb", # Crypto Punks - "0xd87ca9651cdade60cc0b031c2731aeb5aa722fb3", # Ether Gals - "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", # Bored Ape Yacht Club - "0xbd3531da5cf5857e7cfaa92426877b022e612cf8", # Pudgy Penguins - "0xed5af388653567af2f388e6224dc7c4b3241c544", # Azuki - ] - url = ( - "https://api.opensea.io/api/v1/bundles?limit=50&asset_contract_address=%s" - % random.choice(collections) - ) - x = requests.get(url).json()["bundles"] - - return random.choice(x)["assets"][0]["image_url"]