diff --git a/pocketbot.py b/pocketbot.py index 4084b78..23173de 100644 --- a/pocketbot.py +++ b/pocketbot.py @@ -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())