Beispiel #1
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['ranked']
     self.name = 'ranked'
     self.description = "Gives you ranked game stats for a summoner on a champion"
     self.syntax = "#ranked SUMMONERNAME,CHAMPIONNAME"
Beispiel #2
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
 
     self.triggers = ['add']
     self.name = 'add'
     self.description = 'Adds a response to certain commands'
     self.syntax = '#add DATABASE RESPONSE'
Beispiel #3
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['help']
     self.name = 'help'
     self.description = "Provides help for commands that are available"
     self.syntax = "#help [COMMAND]"
Beispiel #4
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
 
     self.triggers = ['define']
     self.name = 'define'
     self.description = "Checks various online dictionaries to define your word."
     self.syntax = "#define [mw#|google#|urban#] WORD"
Beispiel #5
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['location']
     self.name = 'location'
     self.description = "Gets or sets your location"
     self.syntax = "#location [ZIPCODE]"
Beispiel #6
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['division']
     self.name = 'division'
     self.description = "Tells you info about the division a summoner is in"
     self.syntax = "#division SUMMONERNAME"
Beispiel #7
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.name = "review"
     self.triggers = ["review"]
     self.description = "Gives you a review for a movie (from rottentomatoes.com)."
     self.syntax = "#review movie"
Beispiel #8
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['last']
     self.name = 'last'
     self.description = "Tells you info about the last game a summoner played"
     self.syntax = "#last SUMMONERNAME[,SKIP_NUM]"
Beispiel #9
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['roster', 'lolroster']
     self.name = 'roster'
     self.description = "Gets the roster in a given chat medium"
     self.syntax = "#roster [MEDIUM]"
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['steamstatus']
     self.name = 'steamstatus'
     self.description = "Gets status of a Steam user"
     self.syntax = "#steamstatus STEAMNICK"
Beispiel #11
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['distance']
     self.name = 'distance'
     self.description = "Calculates the distance between two people"
     self.syntax = "#distance person[, person2]"
Beispiel #12
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['lolstatus']
     self.name = 'lolstatus'
     self.description = "Gets status of a League of Legends summoner"
     self.syntax = "#lolstatus SUMMONER"
Beispiel #13
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.name = "weather"
     self.triggers = ["weather"]
     self.description = "Gets the weather at a location"
     self.syntax = "#weather LOCATION"
     self.woe_re = re.compile("<woeid>(?P<woeid>[^<]+)</woeid>")
Beispiel #14
0
    def __init__(self, chatbot):
        ExplicitCommand.__init__(self, chatbot)

        self.triggers = ["chat"]
        self.name = "chat"
        self.description = "Chat with the bot"
        self.syntax = "#chat SAYSOMETHINGHEREDUMBASS"

        self._clever = ChatterBotFactory().create(ChatterBotType.CLEVERBOT)
        self._clever_session = self._clever.create_session()
Beispiel #15
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['abam','randomitems']
     self.name = 'abam'
     self.description = "Gives you a random set of items for all blind all mid"
     self.syntax = "#abam"
     
     self.boots = []
     self.non_boots = []
     self.item_blacklist = []
     
     self.loadItems('http://ddragon.leagueoflegends.com/cdn/0.301.3/data/en_US/item.json')
Beispiel #16
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['calc']
     self.name = 'calc'
     self.description = "Attempts to calculate an expression, using Wolfram Alpha"
     self.syntax = "#calc EXPRESSION"
     
     self.wolfram_client = None
     if 'wolfram_api_key' in self._chatbot._config:
         key = self._chatbot._config['wolfram_api_key']
         if isinstance(key, basestring) and len(key) > 0: 
             self.wolfram_client = wolframalpha.Client(key)        
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['championselect','champselect','counters']
     self.name = 'championselect'
     self.description = "Checks championselect.net for strong/weak LoL champion matchups"
     self.syntax = "#championselect CHAMPION"
     
     counter_pattern = '<h3 class="counterName">(?P<champ>[^<]+)</h3>'
     self.re_counter = re.compile(counter_pattern)
     
     champ_pattern = '<h2>(?P<champ>.+?) is strong against</h2>'
     self.re_champ = re.compile(champ_pattern)
Beispiel #18
0
 def __init__(self, chatbot):
     ExplicitCommand.__init__(self, chatbot)
     
     self.triggers = ['skill']
     self.name = 'skill'
     self.description = "Returns information about a LoL champion skill"
     self.syntax = "#skill CHAMPION,{PASSIVE,Q,W,E,R}"
     
     self.skill_map = {
       'PASSIVE': 0,
       'Q': 1,
       'W': 2,
       'E': 3,
       'R': 4
     }
Beispiel #19
0
    def __init__(self, chatbot):
        ExplicitCommand.__init__(self, chatbot)


        self._database_file = None
        self._db = None
        command = self.__class__.__name__
        command = command.lower()[0:-7]
        if(self._database_file is None):
            self._database_file = BabelGlobals.location + '/babelpr/commands/databases/'+command+'.db'
        
        self._noun_list = []
        self._adj_list = []
        
        try:
            connection = sqlite3.connect(self._database_file)
            
            cursor = connection.cursor()
            cursor.execute('SELECT noun FROM insult_noun')
            data = cursor.fetchall()
            self._noun_list = [elt[0] for elt in data]
            cursor.close()
            
            cursor = connection.cursor()
            cursor.execute('SELECT adj FROM insult_adj')
            data = cursor.fetchall()
            self._adj_list = [elt[0] for elt in data]
            cursor.close()
        except:
            pass
            
        try:
            connection.close()
        except:
            pass
    
        self.triggers = ['insult']
        self.name = "insult"
        self.description = "Generates a random insult"
        self.syntax = "#insult [person]"