forked from HonusBot/HonusBot
...
This commit is contained in:
parent
70e418eec2
commit
aef4e6fda4
@ -42,10 +42,7 @@ class Command:
|
|||||||
|
|
||||||
def setName(self, name):
|
def setName(self, name):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
def getCommand(self):
|
|
||||||
return self.command
|
|
||||||
|
|
||||||
def setHeaderField(self, param):
|
def setHeaderField(self, param):
|
||||||
self.headerField = param
|
self.headerField = param
|
||||||
|
|
||||||
@ -153,7 +150,7 @@ class InlineBot:
|
|||||||
if not command:
|
if not command:
|
||||||
return self.errorText
|
return self.errorText
|
||||||
|
|
||||||
r = requests.post(self.config.getApiUrl(), headers = { "Content-Type" : "application/json", "User-Agent" : self.config.getUserAgent() }, data = json.JSONEncoder().encode(JSONRequest(self.config, command.getCommand(), senderid, text).__dict__))
|
r = requests.post(self.config.getApiUrl(), headers = { "Content-Type" : "application/json", "User-Agent" : self.config.getUserAgent() }, data = json.JSONEncoder().encode(JSONRequest(self.config, command.getName(), senderid, text).__dict__))
|
||||||
|
|
||||||
#if not r:
|
#if not r:
|
||||||
return self.errorText
|
return self.errorText
|
||||||
|
Loading…
Reference in New Issue
Block a user