-
-
Notifications
You must be signed in to change notification settings - Fork 167
Closed
Labels
Description
Traceback (most recent call last):
File "/opt/miniconda3/envs/mar/lib/python3.11/site-packages/twitchio/client.py", line 208, in wrapped
await func(*args)
File "/home/denis/code/MariaAI/Chat/Chat.py", line 557, in event_message
await chatter_user.delete_chat_messages(APP_SECRET, self.user_id, m.id)
File "/opt/miniconda3/envs/mar/lib/python3.11/site-packages/twitchio/user.py", line 1322, in delete_chat_messages
await self._http.delete_chat_messages(
File "/opt/miniconda3/envs/mar/lib/python3.11/site-packages/twitchio/http.py", line 1078, in delete_chat_messages
return await self.request(Route("DELETE", "moderation/chat", query=q, token=token))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/mar/lib/python3.11/site-packages/twitchio/http.py", line 154, in request
body, is_text = await self._request(route, path, headers, force_app_token=force_app_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/mar/lib/python3.11/site-packages/twitchio/http.py", line 253, in _request
raise errors.HTTPException(f"Failed to fulfill the request", reason=resp.reason, status=resp.status)
twitchio.errors.HTTPException: 404: Failed to fulfill the request: Not Found
My simplified code:
username = ''
APP_SECRET = ''
class Bot(commands.Bot):
def __init__(self):
super().__init__(token=APP_SECRET, prefix='?', initial_channels=[username])
async def event_message(self, message):
m = message
chatter_user = await m.author.user()
await chatter_user.delete_chat_messages(APP_SECRET, self.user_id, m.id)