Reputation: 1
I’m making my first bot but I get this error when running it.
Made with python 3.11 tweepy.
TypeError: Client.create_tweet() takes 1 positional argument but 2 were given
Code:
import tweepy
client = tweepy.Client(
consumer_key="key",
consumer_secret="key",
access_token="key",
access_token_secret="key"
)
client.create_tweet("test")
Any fix or suggestion apreciated! Thanks!
I didn't really try anything, I've searched around but I've hadn't understand the solution, I've recently started to take coding seriously (I'm 15) I've code some very simple snippets and more advances games in UE so most concept are new and in a simple solution I won't really understand it, so thanks for any help and advice!
Upvotes: 0
Views: 500
Reputation: 1
client = tweepy.Client(
bearer_token="key", # <-
consumer_key="key",
consumer_secret="key",
access_token="key",
access_token_secret="key"
)
client.create_tweet(text="test") # <-
Upvotes: 0