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