1
0
Fork 0
mirror of synced 2024-09-30 17:29:33 +13:00

Added compatbility to use the doggo command for any doggo image saved

This commit is contained in:
Phxntxm 2016-07-16 09:45:44 -05:00
parent a2aa235ebd
commit 9df0e06d42

View file

@ -4,6 +4,8 @@ from .utils import checks
import subprocess import subprocess
import urllib.parse import urllib.parse
import urllib.request import urllib.request
import os
import glob
import json import json
import random import random
import discord import discord
@ -35,6 +37,11 @@ class Core:
async def doggo(self, ctx) async def doggo(self, ctx)
"""Use this to print a random doggo image. """Use this to print a random doggo image.
Doggo is love, doggo is life.""" Doggo is love, doggo is life."""
os.chdir('/home/phxntx5/public_html/Bonfire/images')
f = glob.glob('doggo*')[random.randint(0,len(glob.glob('doggo*'))-1)]
f = open(f,'rb')
await self.bot.send_file(ctx.message.channel,f)
f.close()
@commands.command() @commands.command()