add after hours pricing
This commit is contained in:
parent
b85ed86cb5
commit
a59c12dff5
@ -43,7 +43,6 @@ class ActualUtils(commands.Cog):
|
||||
@option(name="title", requried=True, description="The title of the issue")
|
||||
@option(name="description", require=True, description="The body of the issue")
|
||||
async def issue(self, ctx: commands.Context):
|
||||
|
||||
post_args = {"title": title, "description": description}
|
||||
|
||||
headers = {"PRIVATE-TOKEN": os.getenv("gitlab_token")}
|
||||
@ -67,7 +66,6 @@ class ActualUtils(commands.Cog):
|
||||
required=True,
|
||||
)
|
||||
async def define(self, ctx, word):
|
||||
|
||||
import define_word
|
||||
|
||||
embed = define_word.get_definition(word)
|
||||
@ -75,7 +73,6 @@ class ActualUtils(commands.Cog):
|
||||
|
||||
@commands.command(name="tts")
|
||||
async def tts(self, ctx: commands.Context):
|
||||
|
||||
import tts
|
||||
|
||||
if ctx.message.content.split()[1] == "langs":
|
||||
@ -159,7 +156,6 @@ class ActualUtils(commands.Cog):
|
||||
default="California",
|
||||
)
|
||||
async def corona(self, ctx: commands.Context, location):
|
||||
|
||||
import corona
|
||||
|
||||
await ctx.defer()
|
||||
@ -182,7 +178,6 @@ class ActualUtils(commands.Cog):
|
||||
default=False,
|
||||
)
|
||||
async def stock(self, ctx, symbols, verbose):
|
||||
|
||||
import stock
|
||||
|
||||
results = stock.parse_message(symbols, verbose)
|
||||
|
@ -11,56 +11,48 @@ class AnimalFunctions(commands.Cog):
|
||||
guild_ids=None, name="redpanda", description="Posts a photo of a redpanda"
|
||||
)
|
||||
async def redpanda(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(animals.get_red_panda())
|
||||
|
||||
@commands.slash_command(
|
||||
guild_ids=None, name="panda", description="Posts a photo of a panda"
|
||||
)
|
||||
async def panda(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(animals.get_panda())
|
||||
|
||||
@commands.slash_command(
|
||||
guild_ids=None, name="koala", description="Posts a photo of a koala"
|
||||
)
|
||||
async def koala(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(animals.get_koala())
|
||||
|
||||
@commands.slash_command(
|
||||
guild_ids=None, name="racoon", description="Posts a photo of a racoon"
|
||||
)
|
||||
async def racoon(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(animals.get_racoon())
|
||||
|
||||
@commands.slash_command(
|
||||
guild_ids=None, name="fox", description="Posts a photo of a fox"
|
||||
)
|
||||
async def fox(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(animals.get_fox())
|
||||
|
||||
@commands.slash_command(
|
||||
guild_ids=None, name="cat", description="Posts a photo of a cat"
|
||||
)
|
||||
async def cat(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(animals.get_cat())
|
||||
|
||||
@commands.slash_command(
|
||||
guild_ids=None, name="kangaroo", description="Posts a photo of a kangaroo"
|
||||
)
|
||||
async def kangaroo(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(animals.get_kangaroo())
|
||||
|
||||
@commands.slash_command(
|
||||
guild_ids=None, name="dog", description="Posts a photo of a dog"
|
||||
)
|
||||
async def dog(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(animals.get_dog())
|
||||
|
||||
@commands.slash_command(
|
||||
@ -73,21 +65,18 @@ class AnimalFunctions(commands.Cog):
|
||||
guild_ids=None, name="birb", description="Posts a photo of a birb"
|
||||
)
|
||||
async def birb(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(animals.get_birb())
|
||||
|
||||
@commands.slash_command(
|
||||
guild_ids=None, name="cowboy", description="Posts a photo of a bad dog"
|
||||
)
|
||||
async def cowboy(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(animals.cowboy())
|
||||
|
||||
@commands.slash_command(
|
||||
guild_ids=None, name="dale", description="Posts a photo of the goodest boy"
|
||||
)
|
||||
async def dale(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(file=discord.File(animals.dale()))
|
||||
|
||||
@commands.slash_command(
|
||||
|
@ -23,7 +23,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="pout", description="Posts a gif of an anime girl pouting"
|
||||
)
|
||||
async def pout(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="blush")
|
||||
@ -34,7 +33,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="yeet", description="Posts a gif of an anime girl yeeting"
|
||||
)
|
||||
async def yeet(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="yeet")
|
||||
@ -47,7 +45,6 @@ class AnimeGirls(commands.Cog):
|
||||
description="Posts a gif of an anime girl cuddleing",
|
||||
)
|
||||
async def cuddle(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="cuddle")
|
||||
@ -58,7 +55,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="awoo", description="Posts a gif of a dog/anime girl"
|
||||
)
|
||||
async def awoo(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="awoo")
|
||||
@ -71,7 +67,6 @@ class AnimeGirls(commands.Cog):
|
||||
description="Posts a gif of an anime bonking someone on the head",
|
||||
)
|
||||
async def bonk(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="bonk")
|
||||
@ -82,7 +77,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="glomp", description="Posts a gif of an aggressive hug"
|
||||
)
|
||||
async def glomp(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="glomp")
|
||||
@ -93,7 +87,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="pout", description="Posts a gif of an anime girl pouting"
|
||||
)
|
||||
async def pout(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="blush")
|
||||
@ -104,7 +97,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="waifu", description="Posts a gif of an anime girl"
|
||||
)
|
||||
async def waifu(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="waifu")
|
||||
@ -115,7 +107,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="neko", description="Posts a gif of a cat/anime girl"
|
||||
)
|
||||
async def neko(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="neko")
|
||||
@ -128,7 +119,6 @@ class AnimeGirls(commands.Cog):
|
||||
description="Posts a gif of an anime girl bullying someone",
|
||||
)
|
||||
async def bully(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="bully")
|
||||
@ -139,7 +129,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="cry", description="Posts a gif of an anime girl crying"
|
||||
)
|
||||
async def cry(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="cry")
|
||||
@ -150,7 +139,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="hug", description="Posts a gif of an anime girl huging"
|
||||
)
|
||||
async def hug(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="hug")
|
||||
@ -161,7 +149,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="kiss", description="Posts a gif of an anime girl kissing"
|
||||
)
|
||||
async def kiss(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="kiss")
|
||||
@ -172,7 +159,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="lick", description="Posts a gif of an anime girl licking"
|
||||
)
|
||||
async def lick(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="lick")
|
||||
@ -185,7 +171,6 @@ class AnimeGirls(commands.Cog):
|
||||
description="Posts a gif of an anime girl pating someone on the head",
|
||||
)
|
||||
async def pat(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="pat")
|
||||
@ -198,7 +183,6 @@ class AnimeGirls(commands.Cog):
|
||||
description="Posts a gif of an anime girl being smug",
|
||||
)
|
||||
async def smug(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="smug")
|
||||
@ -211,7 +195,6 @@ class AnimeGirls(commands.Cog):
|
||||
description="Posts a gif of an anime girl highfiveing",
|
||||
)
|
||||
async def highfive(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="highfive")
|
||||
@ -222,7 +205,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="nom", description="Posts a gif of an anime girl eating"
|
||||
)
|
||||
async def nom(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="nom")
|
||||
@ -235,7 +217,6 @@ class AnimeGirls(commands.Cog):
|
||||
description="Posts a gif of an anime girl biting someone",
|
||||
)
|
||||
async def bite(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="bite")
|
||||
@ -246,7 +227,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="slap", description="Posts a gif of an anime girl slapping"
|
||||
)
|
||||
async def slap(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="slap")
|
||||
@ -257,7 +237,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="wink", description="Posts a gif of an anime girl winking"
|
||||
)
|
||||
async def wink(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="wink")
|
||||
@ -268,7 +247,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="poke", description="Posts a gif of an anime girl pokeing"
|
||||
)
|
||||
async def poke(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="poke")
|
||||
@ -279,7 +257,6 @@ class AnimeGirls(commands.Cog):
|
||||
guild_ids=None, name="dance", description="Posts a gif of an anime girl dancing"
|
||||
)
|
||||
async def dance(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="dance")
|
||||
@ -292,7 +269,6 @@ class AnimeGirls(commands.Cog):
|
||||
description="Posts a gif of an anime girl cringeing",
|
||||
)
|
||||
async def cringe(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="cringe")
|
||||
@ -305,7 +281,6 @@ class AnimeGirls(commands.Cog):
|
||||
description="Posts a gif of an anime girl blushing",
|
||||
)
|
||||
async def blush(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=core_utils.waifu_pics(endpoint="blush")
|
||||
|
@ -22,7 +22,6 @@ class Cheeky(commands.Cog):
|
||||
description="Separate your choices with 'or', or enter a singular choice to get a yes/no answer.",
|
||||
)
|
||||
async def decide(self, ctx, input_string):
|
||||
|
||||
import random
|
||||
|
||||
choices = input_string.split(" or ")
|
||||
@ -68,7 +67,6 @@ class Cheeky(commands.Cog):
|
||||
description="Posts a greentext image",
|
||||
)
|
||||
async def greentext(self, ctx: commands.Context):
|
||||
|
||||
import get_from_reddit
|
||||
|
||||
embed = discord.Embed(
|
||||
@ -124,7 +122,6 @@ class Cheeky(commands.Cog):
|
||||
name="bottom", description="The bottom text to put on the meme", required=True
|
||||
)
|
||||
async def meme(self, ctx: commands.Context, template, top, bottom):
|
||||
|
||||
import meme_gen
|
||||
|
||||
await ctx.defer()
|
||||
@ -147,7 +144,6 @@ class Cheeky(commands.Cog):
|
||||
|
||||
@commands.slash_command(name="donate")
|
||||
async def donate(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond(
|
||||
"https://paypal.me/ldooks\nhttps://venmo.com/ldooks\nhttps://cash.me/$ldooks"
|
||||
)
|
||||
@ -164,7 +160,6 @@ class Cheeky(commands.Cog):
|
||||
max_length=300,
|
||||
)
|
||||
async def tiktok(self, ctx: commands.Context, input: str):
|
||||
|
||||
import tempfile
|
||||
import base64
|
||||
|
||||
@ -196,7 +191,6 @@ class Cheeky(commands.Cog):
|
||||
|
||||
@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()
|
||||
@ -208,7 +202,6 @@ class Cheeky(commands.Cog):
|
||||
)
|
||||
@option(name="question", description="Your question", required=True)
|
||||
async def eight_ball(self, ctx: commands.Context, question: str):
|
||||
|
||||
import eight_ball
|
||||
|
||||
result = eight_ball.check_8ball(question)
|
||||
@ -233,7 +226,6 @@ class Cheeky(commands.Cog):
|
||||
required=True,
|
||||
)
|
||||
async def twitter(self, ctx: commands.Context, message_id: str):
|
||||
|
||||
message = await ctx.channel.fetch_message(message_id)
|
||||
author_avatar = message.author.avatar
|
||||
response = requests.get(
|
||||
|
@ -86,7 +86,6 @@ class ServerUtils(commands.Cog):
|
||||
description="Returns a link to the worlde luke is hosting",
|
||||
)
|
||||
async def wordle(self, ctx: commands.Context):
|
||||
|
||||
await ctx.respond("https://wordle.luker.gq")
|
||||
|
||||
@commands.slash_command(guild_ids=None, name="dot", description="dot")
|
||||
@ -243,7 +242,6 @@ class ServerUtils(commands.Cog):
|
||||
|
||||
@commands.command(name="help")
|
||||
async def help(self, ctx: commands.Context, method=None):
|
||||
|
||||
import help_methods
|
||||
|
||||
if method:
|
||||
|
@ -29,7 +29,6 @@ class StableDiffusion(commands.Cog):
|
||||
async def sd(
|
||||
self, ctx: commands.Context, positive_prompt: str, negative_prompt: str
|
||||
):
|
||||
|
||||
if ctx.channel.name == "stable-diffusion" or ctx.channel.name == "bot-testing":
|
||||
import socket
|
||||
import stable_diffusion
|
||||
|
@ -6,7 +6,6 @@ my_id = 144986109804412928
|
||||
|
||||
|
||||
def download_image(url, path=None):
|
||||
|
||||
request = requests.get(url)
|
||||
suffix_list = [
|
||||
"jpeg",
|
||||
|
@ -3,7 +3,6 @@ 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/<collection name here> | | jq -r .[].primary_asset_contracts[].address
|
||||
# Alternatively, go to some asset on Opensea and take the chunk of the URL after "assets":
|
||||
|
16
app/stock.py
16
app/stock.py
@ -111,9 +111,19 @@ def get_stock(share_name, verbose=False):
|
||||
embed.set_thumbnail(url=meme_url)
|
||||
embed.set_author(name=request["shortName"])
|
||||
|
||||
embed.add_field(
|
||||
name="Current price", value="$%s" % request["regularMarketPrice"], inline=False
|
||||
)
|
||||
if request["marketState"] == "POST":
|
||||
embed.add_field(
|
||||
name="After Hours price",
|
||||
value="$%s" % request["postMarketPrice"],
|
||||
inline=False,
|
||||
)
|
||||
else:
|
||||
embed.add_field(
|
||||
name="Current price",
|
||||
value="$%s" % request["regularMarketPrice"],
|
||||
inline=False,
|
||||
)
|
||||
|
||||
embed.add_field(
|
||||
name="Opening price", value="$%s" % request["regularMarketOpen"], inline=False
|
||||
)
|
||||
|
@ -49,6 +49,7 @@ async def get_msreg(track):
|
||||
events[track].append(event_object)
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
# sort track events by date
|
||||
def date_to_datetime(input):
|
||||
return datetime.strptime(input["event_date"], "%Y-%m-%d")
|
||||
|
Loading…
x
Reference in New Issue
Block a user