Skip to content

solved #1350

Answered by Harmon758
frazanolo asked this question in Questions
solved #1350
Apr 9, 2020 · 4 comments
Discussion options

You must be logged in to vote

Since discord.py bots run asynchronously, you'll need to use the is_async parameter to run the stream in a separate thread.
Otherwise, the stream will block the Discord bot from running.

Note, Requests is also blocking and is liable to cause issues with your Discord bot.

You can also use Twitter's API with the GET users/show endpoint using API.get_user or the GET users/lookup endpoint using API.lookup_users to retrieve User objects by ID with attributes including name, screen_name, etc. Note though, that Tweepy also uses Requests internally. For asyncio support for Tweepy, see #732.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Harmon758
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question This is a question Discussion This was converted/moved from/to a discussion
3 participants
Converted from issue

This discussion was converted from issue #1350 on December 15, 2020 19:46.