From c759ddab7635aaf5770c15b1554d2f9aa11251b8 Mon Sep 17 00:00:00 2001 From: Arves100 Date: Mon, 9 Mar 2020 02:13:48 +0100 Subject: [PATCH] Fix --- inline.py | 48 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/inline.py b/inline.py index 4f2707e..0ead9ff 100644 --- a/inline.py +++ b/inline.py @@ -17,6 +17,12 @@ class Command: self.headerField = "" self.mode = "" + def __init__(self, name, desc, mode, hf): + self.desc = desc + self.name = name + self.headerField = hf + self.mode = mode + def setMode(self, mode): self.mode = mode @@ -87,39 +93,17 @@ class InlineBot: def __makeCommands(self): cmd = Command() + + # def __init__(self, name, desc, mode, hf): + + self.commands.append(Command("Pony", "yay, ponies!", "imageurl", "imageurl")) + self.commands.append(Command("Clop", "NSFW ponies", "imageurl", "imageurl")) + self.commands.append(Command("Furry", "Furries", "imageurl", "imageurl")) + self.commands.append(Command("Loli", "Cute lolis", "imageurl", "imageurl")) + 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")) - cmd.setName("Pony") - cmd.setDesc("yay, ponies!") - cmd.setMode("imageurl") - cmd.setHeaderField("imageurl") - self.commands.append(cmd) - - cmd.setName("Clop") - cmd.setDesc("NSFW ponies") - self.commands.append(cmd) - - cmd.setName("Furry") - cmd.setDesc("Furries") - self.commands.append(cmd) - - cmd.setName("Loli") - cmd.setDesc("Cute lolis") - self.commands.append(cmd) - - cmd.setName("Yiff") - cmd.setDesc("Yiff") - self.commands.append(cmd) - - cmd.setName("Lewd") - cmd.setDesc("Say hi to the police") - self.commands.append(cmd) - - cmd.setName("Rasoio") - cmd.setDesc("Dai facciamogli lo scherzo del rasoio!1!!") - cmd.setMode("genericurl") - cmd.setHeaderField("htmldescription") - self.commands.append(cmd) - def callRequest(self, command, senderid, text = ""): if not command: return self.errorText