Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

updates

DaoAdvocatec30a621195c3
diff --git a/.env.template b/.env.template
index 6565dfdc5d..7146aafcdf 100644
--- a/.env.template
+++ b/.env.template
@@ -132,3 +132,13 @@ USE_BRIAN_TTS=False
ELEVENLABS_API_KEY=your-elevenlabs-api-key
ELEVENLABS_VOICE_1_ID=your-voice-id-1
ELEVENLABS_VOICE_2_ID=your-voice-id-2
+
+################################################################################
+### TWITTER API
+################################################################################
+
+TW_CONSUMER_KEY=
+TW_CONSUMER_SECRET=
+TW_ACCESS_TOKEN=
+TW_ACCESS_TOKEN_SECRET=
+TW_SEND_TWEETS=True
\ No newline at end of file
diff --git a/autogpt/commands/twitter.py b/autogpt/commands/twitter.py
index 31781ee31b..5589503f2b 100644
--- a/autogpt/commands/twitter.py
+++ b/autogpt/commands/twitter.py
@@ -5,7 +5,6 @@ from dotenv import load_dotenv
load_dotenv()
def send_tweet(tweet_text):
-
consumer_key = os.environ.get("TW_CONSUMER_KEY")
consumer_secret= os.environ.get("TW_CONSUMER_SECRET")
access_token= os.environ.get("TW_ACCESS_TOKEN")
@@ -21,5 +20,5 @@ def send_tweet(tweet_text):
try:
api.update_status(tweet_text)
print("Tweet sent successfully!")
- except tweepy.TweepError as e:
- print("Error sending tweet: {}".format(e.reason))
+ except tweepy.TweepyException as e:
+ print("Error sending tweet: {}".format(e.reason))
\ No newline at end of file