Mercurial > codedump
comparison randomimageposter.py @ 21:358cad883bc3
Update randomimageposter.py
committer: GitHub <noreply@github.com>
author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
---|---|
date | Fri, 09 Apr 2021 21:49:49 -0400 |
parents | bab0727f84f6 |
children |
comparison
equal
deleted
inserted
replaced
20:dfdb15d3caef | 21:358cad883bc3 |
---|---|
6 @client.event | 6 @client.event |
7 async def on_ready(): | 7 async def on_ready(): |
8 print("Ready!") | 8 print("Ready!") |
9 | 9 |
10 @client.command() | 10 @client.command() |
11 async def random(ctx): | 11 async def post(ctx): |
12 files = glob.glob("*.png") | 12 files = glob.glob("*.png") |
13 files.extend(glob.glob("*.jpg")) | 13 files.extend(glob.glob("*.jpg")) |
14 files.extend(glob.glob("*.gif")) | 14 files.extend(glob.glob("*.gif")) |
15 file = random.choice(files) | 15 file = random.choice(files) |
16 await ctx.send(file=discord.File(file)) | 16 await ctx.send(file=discord.File(file)) |