From 0afa761fe8297424ce7e425e809c0922f03809c1 Mon Sep 17 00:00:00 2001 From: pocketjawa Date: Tue, 21 Feb 2017 05:33:11 +0000 Subject: [PATCH] Changed commands to be case-insensitive --- pocketbot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pocketbot.py b/pocketbot.py index 6cf4ec2..5d942cf 100644 --- a/pocketbot.py +++ b/pocketbot.py @@ -24,12 +24,12 @@ def on_ready(): @client.event @asyncio.coroutine def on_message(message): - if message.content.startswith('!maki'): + if message.content.lower().startswith('!maki'): yield from client.send_message(message.channel, 'http://maki.pocketjawa.com/monday.png') - elif message.content.startswith('!sleep'): + elif message.content.lower().startswith('!sleep'): yield from asyncio.sleep(5) yield from client.send_message(message.channel, 'Done sleeping') - elif message.content.startswith('!mixes'): + elif message.content.lower().startswith('!mixes'): yield from client.send_message(message.channel, 'You can download mp3s of any of my mixes at http://maki.pocketjawa.com/mixes/')