def main(): odds = oddsEngine() bets = bettingEngine(odds) with open('oauth_token', 'r') as fp: password = fp.read() server = irc.bot.ServerSpec('irc.twitch.tv', port=6667, password=password.strip()) bot = BetBot('#rellim7','spelunkybot', server) bot.start()
def __init__(self, channel, nickname, server): irc.bot.SingleServerIRCBot.__init__(self, [server], nickname, nickname) self.channel = channel self.theOdds = oddsEngine() self.theBetter = bettingEngine(self.theOdds) self.user = people.users() self.sp = Spelunker() self.is_dead = self.sp.is_dead self.deathDict={} with open('death_list.csv') as csvfile: rawData = csv.reader(csvfile, delimiter = ',') for row in rawData: self.deathDict[row[1]]=row[0] self.reactor.execute_every(5,self.process_spelunker) self.start()