This Python script copies all emotes from a source emote set to a target emote set on 7TV. The script leverages the 7TV GraphQL API to achieve this.
- Python 3.x
requestslibrary
Install the requests library if you haven't already:
pip install requests-
API Token: You'll need an API token (
seventv-auth) to authenticate with 7TV. You can obtain it through the 7TV platform. -
Emote Set IDs:
- Set the
SOURCE_SET_IDto the ID of the emote set you want to copy from. - Set the
TARGET_SET_IDto the ID of the emote set you want to copy to.
- Set the
-
Open the script and replace the following constants with your own values:
SOURCE_SET_ID: ID of the source emote set.TARGET_SET_ID: ID of the target emote set.AUTH_TOKEN: Your 7TV API token.
-
Run the script:
python main.pyThe script will attempt to copy each emote from the source set to the target set, showing the success or failure of each emote transfer.
The script consists of three main functions:
get_emote_set(set_id): Fetches all emotes from the specified emote set using the 7TV API.add_emote_to_set(set_id, emote_id, emote_name, auth_token): Adds an individual emote to the target set using the 7TV GraphQL API.copy_emote_set(source_set_id, target_set_id, auth_token): Iterates through each emote in the source set and attempts to add it to the target set.
- A short delay is added between each emote copy operation to avoid API rate limits.
- If an emote already exists in the target set, the script will skip it and log the result.
This project is licensed under the MIT License.