mirror of
https://gitlab.jonasled.de/jonasled/discordbot
synced 2024-09-24 00:38:57 +02:00
fixed jensmeme
This commit is contained in:
parent
40d7a71352
commit
cf785faf0a
1 changed files with 2 additions and 6 deletions
8
bot.py
8
bot.py
|
@ -450,12 +450,8 @@ async def fail(ctx):
|
|||
@bot.command(pass_context=True, brief="sends a random upload from jensmemes.tilera.xyz")
|
||||
async def jensmeme(ctx):
|
||||
await ctx.message.add_reaction("✅")
|
||||
r = get("https://jensmemes.tilera.xyz/random.php") # get random upload
|
||||
url = "https://jensmemes.tilera.xyz/" + r.text.split("href='")[1].split("'")[0]
|
||||
r = get(url)#get the url to the fail
|
||||
image_data = BytesIO(r.content)#download tthe image and load it into BytesIO
|
||||
image_data.seek(0)
|
||||
await ctx.send(file=discord.File(image_data, 'jensmeme.' + url.split(".")[-1]))#send the fail image
|
||||
r = get("https://jensmemes.tilera.xyz/randomapi.php") # get random upload
|
||||
await ctx.send(r.text)#send the fail image
|
||||
# ___ ___ _ ______ _
|
||||
# | \/ | (_) | ___ \ | |
|
||||
# | . . | _ _ ___ _ ___ | |_/ / ___ | |_
|
||||
|
|
Loading…
Reference in a new issue