Added command to post random Tohru image!

dev
pocketjawa 2017-02-25 00:00:47 -05:00
parent 12193fadd8
commit c5a4205492
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import discord
import asyncio
import configparser
import datetime
import random
#Import config file
config = configparser.ConfigParser()
@ -59,6 +60,10 @@ def on_message(message):
elif message.content.lower().startswith('!ups'):
ups_status = open("/tmp/ups_status.txt","r")
yield from client.send_message(message.channel, ups_status.read())
elif message.content.lower().startswith('!tohru'):
tohru_list_file = open("/srv/discord-pocketbot/lists/tohru_images.txt", "r")
tohru_pics = tohru_list_file.read().split()
yield from client.send_message(message.channel, random.choice(tohru_pics))
client.loop.create_task(ups_check())