PythonistaGuild / TwitchIO

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

I can't use twitch commands in chat as moderator with twitchio. #384

Closed Xxrob22xX closed 1 year ago

Xxrob22xX commented 1 year ago

ctx.channel.send(f"/delete {ctx.id}") it doesn't work anymore, and it doesn't work with /timeout or /clear either. the bot uses my account (with full moderator permissions) but can't use any twitch commands, but I can use them. It used to work, but now it doesn't work anymore. the bot is still able to read and write in the chat.

I don't know if it's an external problem or mine.

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.

chillymosh commented 1 year ago

@Xxrob22xX Twitch deprecated /commands for bots and IRC in general. You now have to use the Helix endpoints to carry out these tasks.

https://dev.twitch.tv/docs/irc/chat-commands/

Chat commands through IRC have been deprecated and will no longer function on or about February 18, 2023. See the forum announcement for more details and discussion. Refer to the migration guide section below for equivalent Twitch API endpoints.

Gouvernathor commented 1 year ago

What does that mean ? What is the class and method to send these Helix endpoints ?

EvieePy commented 1 year ago

Regarding your issue https://github.com/TwitchIO/TwitchIO/issues/388#issuecomment-1556049097

Most chat commands are associated with the User and the bot can no longer send commands via IRC/Chat.

https://twitchio.dev/en/latest/reference.html#twitchio.PartialUser.chat_announcement

Gouvernathor commented 1 year ago

Thanks for the info ! it's a bit weird that the token and user id must be given explicitly since we only have one of each anyway (and .send doesn't require that for example). But that's for another issue.

IAmTomahawkx commented 1 year ago

This is not usually true. Any bot that scales beyond one streamer will have multiple tokens and user ids, and as such they need to be specified somewhere. Send does not require tokens because it doesn't make API calls. It uses the IRC connection that is already authenticated