mirror of
https://gitlab.jonasled.de/jonasled/discordbot
synced 2024-11-20 10:13:03 +01:00
added jensmeme command
This commit is contained in:
parent
6011802d12
commit
1849e47a17
1 changed files with 9 additions and 0 deletions
9
bot.py
9
bot.py
|
@ -438,6 +438,15 @@ async def fail(ctx):
|
|||
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, 'fail.gif'))#send the fail image
|
||||
|
||||
@bot.command(pass_context=True, brief="sends a random upload from jensmemes.tilera.xyz")
|
||||
async def jensmeme(ctx):
|
||||
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
|
||||
# ___ ___ _ ______ _
|
||||
# | \/ | (_) | ___ \ | |
|
||||
# | . . | _ _ ___ _ ___ | |_/ / ___ | |_
|
||||
|
|
Loading…
Reference in a new issue