cleaning twitter, bot
This commit is contained in:
parent
a048452deb
commit
29e7fef87f
10
bot.py
10
bot.py
|
@ -19,14 +19,14 @@ import yaml
|
|||
os.chdir(sys.path[0]) #do stuff relative to the installation directory
|
||||
|
||||
class Bot(object):
|
||||
def __init__(self):
|
||||
def __init__(self, nick, channel, network):
|
||||
self.commands = [] # fn, name, func, args
|
||||
self.filters = [] #fn, name, func
|
||||
self.nick = nick
|
||||
self.channel = channel
|
||||
self.network = network
|
||||
|
||||
bot = Bot()
|
||||
bot.nick = nick
|
||||
bot.channel = channel
|
||||
bot.network = network
|
||||
bot = Bot(nick, channel, network)
|
||||
|
||||
print 'Loading plugins'
|
||||
typs = '|'.join('command filter event'.split())
|
||||
|
|
|
@ -20,4 +20,5 @@ def twitter(bot, input):
|
|||
return "can't find that username"
|
||||
|
||||
tweet = tweet.find('status')
|
||||
bot.say(': '.join(tweet.find(x).text for x in 'created_at user/name text'.split()))
|
||||
bot.say(': '.join(tweet.find(x).text for x in
|
||||
'created_at user/screen_name text'.split()))
|
||||
|
|
Loading…
Reference in New Issue