track whether or not the twitter module has been authenticated
This commit is contained in:
		
							parent
							
								
									41a5c43284
								
							
						
					
					
						commit
						d9b85f4364
					
				| @ -51,6 +51,7 @@ class Twitter(Module): | ||||
| 
 | ||||
|         # create a default twitter API account, in case we never auth | ||||
|         self.twit = twitter.Api() | ||||
|         self.authed = False | ||||
| 
 | ||||
|     def do(self, connection, event, nick, userhost, replypath, what, admin_unlocked): | ||||
|         """ | ||||
| @ -104,6 +105,7 @@ class Twitter(Module): | ||||
| 
 | ||||
|                 # finally, create the twitter API object | ||||
|                 self.twit = twitter.Api(self.consumer_key, self.consumer_secret, self.access_token['oauth_token'], self.access_token['oauth_token_secret']) | ||||
|                 self.authed = True | ||||
|                 return self.reply(connection, replypath, 'The bot is now logged in.') | ||||
| 
 | ||||
|     def tweet_or_retweet_text(self, tweet, print_source=False): | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user