> For the complete documentation index, see [llms.txt](https://mtgmodders.gitbook.io/etg-modding-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mtgmodders.gitbook.io/etg-modding-guide/twitchapi-and-poll-system-guide/introduction-and-general-functionality.md).

# introduction and general functionality

twitch api, or tapi for short, is an API that helps centralize some twitch interaction.

this generally doesnt make it a complex api, however. The main goal is to prevent clashing between multiple mods trying to do twitch things, as well as save the user the hassle of inputting their settings into multiple mods.&#x20;

user functionality:

tapi has 3 main commands

"tapi:setchannel \<channelname> ". This sets the name of the channel the API will try to connect to. Make sure your spelling is correct. this only needs to be done once.

"tapi:start"    this command starts the api and connects it to your channel's chat. It will then start "listening" to messages. if twitch mod seem to not work, double check you set the name correctly, restart the game, and run this command again

tapi:toggle toggles api functionality on and off. Does not disconnect the API, but should disable API behavior, as well as send a message to all mods that functionality has been disabled/enabled


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mtgmodders.gitbook.io/etg-modding-guide/twitchapi-and-poll-system-guide/introduction-and-general-functionality.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
