Added command to post random Tohru image!
parent
12193fadd8
commit
c5a4205492
|
@ -3,6 +3,7 @@ import discord
|
||||||
import asyncio
|
import asyncio
|
||||||
import configparser
|
import configparser
|
||||||
import datetime
|
import datetime
|
||||||
|
import random
|
||||||
|
|
||||||
#Import config file
|
#Import config file
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
|
@ -59,6 +60,10 @@ def on_message(message):
|
||||||
elif message.content.lower().startswith('!ups'):
|
elif message.content.lower().startswith('!ups'):
|
||||||
ups_status = open("/tmp/ups_status.txt","r")
|
ups_status = open("/tmp/ups_status.txt","r")
|
||||||
yield from client.send_message(message.channel, ups_status.read())
|
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())
|
client.loop.create_task(ups_check())
|
||||||
|
|
Loading…
Reference in New Issue