diff --git a/.gitignore b/.gitignore
index 8516a15..c9768dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -300,3 +300,5 @@ $RECYCLE.BIN/
# End of https://www.gitignore.io/api/vim,linux,macos,python,android,windows
config.ini
+
+launch.sh
diff --git a/inline.py b/inline.py
old mode 100644
new mode 100755
index 440635e..3dc9d12
--- a/inline.py
+++ b/inline.py
@@ -56,7 +56,7 @@ class JSONRequest(object):
self.command = command
self.replyToUserId = 0
self.senderUserId = senderId
- self.chatId = 0
+ self.chatId = 987120603
self.queryText = text
self.rawSingleArgument = False
@@ -125,6 +125,7 @@ class InlineBot:
def __init__(self):
self.errorText = "Sowwy mawster, an ewror occuwed. ;;w;;"
self.commands = []
+ self.inlinecommands = []
self.config = None
self.__loadConfig()
@@ -142,7 +143,11 @@ class InlineBot:
self.commands.append(Command("Yiff", "Yiff", "imageurl", "imageUrl"))
self.commands.append(Command("Lewd", "Say hi to the police", "imageurl", "imageUrl"))
self.commands.append(Command("Rasoio", "Dai facciamogli lo scherzo del rasoio!1!!", "genericurl", "htmlDescription"))
- self.cancerCommand = Command("Cancer", "Search cancer", "imageurl", "imageUrl")
+ self.commands.append(Command("Pillon", "Sal🅱️ini ti blocca i porno, che fai?", "genericurl", "htmlDescription"))
+# self.commands.append(Command("Pillon", "", "genericurl", "htmlDescription"))
+ self.inlinecommands.append(Command("Cancer", "Search on tbib.org", "imageurl", "imageUrl"))
+ self.inlinecommands.append(Command("R34", "Search on rule34.xxx", "imageurl", "imageUrl"))
+ self.inlinecommands.append(Command("Safe", "Search on e926", "imageurl", "imageUrl"))
def callRequest(self, command, senderid, text = ""):
if not command:
@@ -225,7 +230,7 @@ class InlineBot:
if command.getMode() == "imageurl":
contentText = InputTextMessageContent("HonusBot", "HTML")
elif command.getMode() == "genericurl":
- contentText = InputTextMessageContent("link", "HTML")
+ contentText = InputTextMessageContent(resp.getHtmlDesc(), "HTML")
else:
contentText = InputTextMessageContent("Error", "HTML")
@@ -245,8 +250,9 @@ class InlineBot:
for command in self.commands:
results.append(self.makeResult(command, senderid))
else:
- self.cancerCommand.setDesc("Search cancer about " + query)
- results.append(self.makeResult(self.cancerCommand, senderid, query))
+ for command in self.inlinecommands:
+ command.setDesc("Search: " + query)
+ results.append(self.makeResult(command, senderid, query))
context.bot.answer_inline_query(update.inline_query.id, results, 1, False)
InlineBot().start()
diff --git a/service.sh b/service.sh
new file mode 100755
index 0000000..bda385c
--- /dev/null
+++ b/service.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+python3 inline.py