diff --git a/helpcommand.txt b/helpcommand.txt index dce6a22..e848d49 100644 --- a/helpcommand.txt +++ b/helpcommand.txt @@ -7,4 +7,5 @@ Here is the the list of possible commands at this point in time: !switch: display time until the switch comes out! !wtf: Don't use unless you want a wall of copypasta !ups: Print the status of the main UPS. Updated once a minute. -!tohru: Posts a random pic of the one and only Tohru! \ No newline at end of file +!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) \ No newline at end of file diff --git a/pocketbot.py b/pocketbot.py index 23173de..8c35453 100644 --- a/pocketbot.py +++ b/pocketbot.py @@ -64,6 +64,8 @@ def on_message(message): 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)) + 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())