Add halo role to welcome message
This commit is contained in:
parent
d93cf60e73
commit
ba28561f99
@ -15,7 +15,8 @@ def get_red_panda():
|
||||
|
||||
|
||||
def get_dog():
|
||||
return random.choice([random_sheeb, random_dog, random_dog_reddit])()
|
||||
# return random.choice([random_sheeb, random_dog, random_dog_reddit])()
|
||||
return random_dog_reddit()
|
||||
|
||||
|
||||
def random_sheeb():
|
||||
@ -46,7 +47,6 @@ def random_dog_reddit():
|
||||
"swedishvallhund",
|
||||
"puppy101",
|
||||
"lookatmydog",
|
||||
"dogs",
|
||||
"jackrussellterrier",
|
||||
]
|
||||
)
|
||||
|
@ -42,6 +42,8 @@ async def on_ready():
|
||||
|
||||
🚀 for Star Citizen
|
||||
|
||||
👽 for Halo
|
||||
|
||||
:gear: for Lethal Company
|
||||
|
||||
🏎️ for Sim Racing
|
||||
@ -74,6 +76,7 @@ async def on_raw_reaction_add(payload):
|
||||
"🚀": "Star Citizens",
|
||||
"⚙️": "Lethal Gamers",
|
||||
"🏎️": "sim racists",
|
||||
"👽": "Gaylo gamers",
|
||||
}
|
||||
|
||||
if payload.channel_id == 1026281775984549958:
|
||||
|
@ -23,6 +23,8 @@ def get_image(boards, nsfw=False):
|
||||
"i3.kym-cdn.com",
|
||||
"imgur.com",
|
||||
"media.giphy.com",
|
||||
"v.redd.it",
|
||||
"reddit.com",
|
||||
]
|
||||
request_string = "https://reddit.com/r/{}/random.json".format(boards)
|
||||
|
||||
@ -38,11 +40,11 @@ def get_image(boards, nsfw=False):
|
||||
|
||||
response = requests.get(
|
||||
request_string, headers={"User-agent": random_user_agent}
|
||||
).json()[0]["data"]["children"][0]
|
||||
).json()[0]["data"]["children"][0]["data"]
|
||||
|
||||
if response["data"]["domain"] not in domains:
|
||||
# If we dont find an approved domain, re-try the request
|
||||
return get_image(boards, nsfw=nsfw)
|
||||
image_url = response["data"]["url"].replace("http://", "https://")
|
||||
if response["secure_media"]:
|
||||
image_url = response["secure_media"]["reddit_video"]["fallback_url"]
|
||||
elif response["domain"] in domains:
|
||||
image_url = response["url_overridden_by_dest"]
|
||||
|
||||
return image_url
|
||||
|
Loading…
x
Reference in New Issue
Block a user