diff --git a/toot_bot.py b/toot_bot.py index ee47e7e..e7f4686 100644 --- a/toot_bot.py +++ b/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."""