Browse Source

Merge branch 'updatemastodonpy' into 'master'

update stream_user() for newest mastodon.py

See merge request photog.social/mastodon_bot!5
master
Mike C 3 years ago
parent
commit
fdfa29151c
  1. 8
      toot_bot.py

8
toot_bot.py

@ -123,7 +123,7 @@ def rss(config):
cursor = conn.cursor()
# Ensure cache table has been created
cursor.execute('create table if not exists article_cache (id varchar(256) primary key);')
cursor.execute('CREATE TABLE IF NOT EXISTS article_cache (id VARCHAR(256) PRIMARY KEY);')
conn.commit()
# Run through all articles in feed
@ -169,7 +169,7 @@ def follow(config):
api_base_url=config['config']['api_base_url']
)
mastodon.user_stream(FollowBot(config))
mastodon.stream_user(FollowBot(config))
def followautorespond(config):
"""Auto respond to new followers"""
@ -178,7 +178,7 @@ def followautorespond(config):
access_token=config['config']['user_cred_file'],
api_base_url=config['config']['api_base_url']
)
mastodon.user_stream(NewFollowerAutoRespondBot(config))
mastodon.stream_user(NewFollowerAutoRespondBot(config))
def autorespond(config):
"""Auto respond to @'s to the configured account"""
@ -188,7 +188,7 @@ def autorespond(config):
api_base_url=config['config']['api_base_url']
)
mastodon.user_stream(AutoRespondBot(config))
mastodon.stream_user(AutoRespondBot(config))
def handle_command_line():
"""Parse and act on the command line."""

Loading…
Cancel
Save