Beispiel #1
0
 def yo(self, server, message, username, link):
     ctx = server.lower(message.context)
     if ctx not in self.keys:
         return "04│🖐│ This channel doesn't have a yo account."
     args = {"api_token": self.keys[ctx], 'username': username}
     if link: args["link"] = link
     data = requests.post("http://api.justyo.co/yo/", data=args)
     try:
         data = data.json()
     except:
         return "04│🖐│ Yo's f****d up."
     else:
         if "success" in data:
             return "13│🖐│ Yo'd at %s" % username
         else:
             return "04│🖐│ " + data["error"]
Beispiel #2
0
 def yo(self, server, message, username, link):
     ctx = server.lower(message.context)
     if ctx not in self.keys:
         return "04│🖐│ This channel doesn't have a yo account."
     args = {"api_token": self.keys[ctx], 'username':username}
     if link: args["link"] = link
     data = requests.post("http://api.justyo.co/yo/", data=args)
     try:
         data = data.json()
     except:
         return "04│🖐│ Yo's f****d up."
     else:
         if "success" in data:
            return "13│🖐│ Yo'd at %s" % username
         else:
             return "04│🖐│ " + data["error"]
Beispiel #3
0
 def setyo(self, server, message, username):
     self.users[server.lower(message.address.nick)] = username
     return "13│🖐│ Associated %s with yo account %s. This currently does nothing." % (
         message.address.nick, username)
Beispiel #4
0
 def yoassoc(self, server, message, channel, route, apikey):
     self.routes[route] = server.lower(channel)
     self.keys[server.lower(channel)] = apikey
     return "13│🖐│ Associated /%s with %s (account %s)" % (route, channel,
                                                             apikey)
Beispiel #5
0
 def setyo(self, server, message, username):
     self.users[server.lower(message.address.nick)] = username
     return "13│🖐│ Associated %s with yo account %s. This currently does nothing." % (message.address.nick, username)
Beispiel #6
0
 def yoassoc(self, server, message, channel, route, apikey):
     self.routes[route] = server.lower(channel)
     self.keys[server.lower(channel)] = apikey
     return "13│🖐│ Associated /%s with %s (account %s)" % (route, channel, apikey)