def execute(self, message, user, params): params = params.group(1) params = self.timestampre.sub(' ', params).strip() session.add(Quote(text=params)) session.commit() message.reply("Added your shitty quote: " + params)
def execute(self, message, user, params): params = params.group(1) quote, count = Quote.search(params) reply = str(quote) if count < 1: reply = "No quotes matching '%s'" % (params, ) if count > 1 and params: reply += " (%d more quotes match this search)" % (count - 1, ) message.reply(reply)
def execute(self, message, user, params): params = params.group(1) quote, count = Quote.search(params) reply = str(quote) if count < 1: reply = "No quotes matching '%s'" % (params,) if count > 1 and params: reply+=" (%d more quotes match this search)" % (count - 1,) message.reply(reply)
def execute(self, message, user, params): params = params.group(1) quote, count = Quote.search(params) if count < 1: reply = "No quotes matching '%s'" % (params,) if count > 1: reply = "There were %d quotes matching your search, I can only be bothered to delete one quote at a time you demanding f*****t" % (count,) if count == 1: session.delete(quote) session.commit() reply="Removed: '%s'" % (quote,) message.reply(reply)