PythonistaGuild / TwitchIO

An Async Bot/API wrapper for Twitch made in Python.
https://twitchio.dev
MIT License
785 stars 163 forks source link

PartialUser.follow is broken #398

Closed Gouvernathor closed 1 year ago

Gouvernathor commented 1 year ago

DEBUG:twitchio.http:Received a response from a request with status 200: {'data': [{'id': (((anonymized, only infos about the channel)))
DEBUG:twitchio.http:Received a response from a request with status 404: {'error': 'Not Found', 'status': 404, 'message': 'This endpoint is deprecated and will be shutdown on July 28, 2021. Applications that have not accessed this endpoint before June 28, 2021 can no longer call this endpoint. For more information, see https://discuss.dev.twitch.tv/t/deprecation-of-create-and-delete-follows-api-endpoints'}
DEBUG:twitchio.client:dispatching event command_error
Ignoring exception in command: Failed to fulfil request (404).:
Traceback (most recent call last):
  File "C:\Users\Armise\AppData\Roaming\Python\Python311\site-packages\twitchio\ext\commands\core.py", line 214, in invoke
    await self._callback(*args, *context.args, **context.kwargs)
  File "E:\dev\gouvernabot\GouvernaBot.py", line 155, in follow
    await usr.follow(usr.id, config["token"])
  File "C:\Users\Armise\AppData\Roaming\Python\Python311\site-packages\twitchio\user.py", line 615, in follow
    await self._http.post_follow_channel(
  File "C:\Users\Armise\AppData\Roaming\Python\Python311\site-packages\twitchio\http.py", line 790, in post_follow_channel
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Armise\AppData\Roaming\Python\Python311\site-packages\twitchio\http.py", line 168, in request
    body, is_text = await self._request(route, path, headers)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Armise\AppData\Roaming\Python\Python311\site-packages\twitchio\http.py", line 225, in _request
    raise errors.HTTPException(
twitchio.errors.HTTPException: Failed to fulfil request (404).```
By following the page linked in the 404 message it seems they closed the ability to follow permanently, if so the follow method should not be documented anymore.
github-actions[bot] commented 1 year ago

Hello! Thanks for the issue. If this is a general help question, for a faster response consider joining the official Discord Server

Else if you have an issue with the library please wait for someone to help you here.

IAmTomahawkx commented 1 year ago

We do not remove methods in accordance with twitch changes, as this would put the breaking change on the lib instead of the api. There is no action needed here.

Gouvernathor commented 1 year ago

Well you could remove it from the documentation at least, since it doesn't do anything now.

chillymosh commented 1 year ago

I'll simply add a warning to the docs for now. This is obviously removed in 3.x