This commit is contained in:
b3yond 2017-06-25 18:10:13 +02:00
commit 7cfac3557c
4 changed files with 5 additions and 9 deletions

View file

View file

@ -9,8 +9,9 @@ import time
class RetootBot(object):
def __init__(self, config):
def __init__(self, config, filter):
self.config = config
self.filter = filter
self.register()
self.login()
@ -54,7 +55,8 @@ class RetootBot(object):
retoots = []
for notification in self.m.notifications():
if (notification['type'] == 'mention'
and notification['status']['id'] not in self.seen_toots):
and notification['status']['id'] not in self.seen_toots
and self.filter.check_string(notification['status']['content'])):
print('Boosting toot %d from %s: %s' % (
notification['status']['id'],
notification['status']['account']['acct'],

View file

@ -1,4 +1,3 @@
[mapp]
app_name = 'yourcity_ticketfrei'
@ -14,8 +13,3 @@ consumer_secret = "09muvs098u08m9examplevsum098mu"
[tuser]
access_token_key = "u098umgfres09ugexa-mplef7n60cwhxm12"
access_token_secret = "8708mj9ßc298m34333example3333tex"
[trigger]
goodlist_path = "goodlist/"
blacklist_path = "blacklist/"

View file

@ -13,7 +13,7 @@ if __name__ == '__main__':
trigger = Trigger(config)
mbot = RetootBot(config)
mbot = RetootBot(config, trigger)
tbot = RetweetBot(trigger)
try: