aboutsummaryrefslogtreecommitdiff
path: root/lib/__init__.py
diff options
context:
space:
mode:
authorromangraef <roman.graef@gmail.com>2018-03-11 18:35:47 +0100
committerromangraef <roman.graef@gmail.com>2018-03-11 18:35:47 +0100
commitf3cbd5100b205d9d9e7f3b3b27b7c37b69834aac (patch)
treeba56c77275647907067d87b185bb5a65513bf328 /lib/__init__.py
parent58f62605992da8fe6f107fc850aa4f18ba4ec274 (diff)
downloadtelegramuserbot-f3cbd5100b205d9d9e7f3b3b27b7c37b69834aac.tar.gz
telegramuserbot-f3cbd5100b205d9d9e7f3b3b27b7c37b69834aac.tar.bz2
telegramuserbot-f3cbd5100b205d9d9e7f3b3b27b7c37b69834aac.zip
fixed eval und stuff
Diffstat (limited to 'lib/__init__.py')
-rw-r--r--lib/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/__init__.py b/lib/__init__.py
index 2c67b83..edb1b42 100644
--- a/lib/__init__.py
+++ b/lib/__init__.py
@@ -45,12 +45,15 @@ class CommandContext(object):
self.client = client
self.channel = channel
self.message = message
- self.rest_content = re.sub('.*? ', '', message.message)
+ self.rest_content = re.sub('^.*? ', '', message.message)
self.author = message.from_id
def respond(self, text):
self.client.send_message(self.channel, text=text)
+ def edit(self, text):
+ self.client.edit_message_text(chat_id=self.channel, message_id=self.message.id, text=text)
+
def register_command(func):
if not is_command(func):