# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
