Added command to change bots Now Playing status

dev
pocketjawa 2017-02-26 14:54:22 -05:00
parent 0b618c1ba1
commit 4239853397
2 changed files with 4 additions and 1 deletions

View File

@ -8,3 +8,4 @@ Here is the the list of possible commands at this point in time:
!wtf: Don't use unless you want a wall of copypasta !wtf: Don't use unless you want a wall of copypasta
!ups: Print the status of the main UPS. Updated once a minute. !ups: Print the status of the main UPS. Updated once a minute.
!tohru: Posts a random pic of the one and only Tohru! !tohru: Posts a random pic of the one and only Tohru!
!setplaying: Sets the bot's Now Playing status to whatever you say (eg !setplaying with Tohru)

View File

@ -64,6 +64,8 @@ def on_message(message):
tohru_list_file = open("/srv/discord-pocketbot/lists/tohru_images.txt", "r") tohru_list_file = open("/srv/discord-pocketbot/lists/tohru_images.txt", "r")
tohru_pics = tohru_list_file.read().split() tohru_pics = tohru_list_file.read().split()
yield from client.send_message(message.channel, random.choice(tohru_pics)) yield from client.send_message(message.channel, random.choice(tohru_pics))
elif message.content.lower().startswith('!setplaying'):
yield from client.change_presence(game=discord.Game(name=message.content.partition(' ')[2]))
client.loop.create_task(ups_check()) client.loop.create_task(ups_check())