i wrote a mutation for adding an emote to an emote set. I think the "overrideConflicts" argument when set to true is not working inside of "addEmote" for v4
query = """
mutation AddEmoteToSet($emoteSetId: Id!, $emote: EmoteSetEmoteId!, $zeroWidth: Boolean, $override: Boolean) {
emoteSets {
emoteSet(id: $emoteSetId) {
addEmote(id: $emote, zeroWidth: $zeroWidth, overrideConflicts: $override) {
id,
name
}
}
}
}
"""
import requests
url = "https://7tv.io/v4/gql"
auth_token = "your_auth_token"
headers = {
"Content-Type": "application/json",
"Authorization": auth_token # Replace with your 7TV API token
}
# Query Variables
pepeW_v1 = "01GB9XMSPG00098BZVD7GKTW1Z"
pepeW_v2 = "01F92FAFQ80009Z5XHWYCAXD0W"
variables = {
"emoteSetId": "your_emote_set_id",
"emote": {
"emoteId": pepeW_v1
},
"zeroWidth": False,
"override": True
}
response = requests.post(url, json={"query": query, "variables": variables}, headers=headers)
# Check Response
if response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code} - {response.text}")
Which does add an emote of pepeW to my Set. however when i repeat the request with the Other pepeW of the same name. ideally i want to replace the old one or override it.
pepeW_v2 = "01F92FAFQ80009Z5XHWYCAXD0W"
variables = {
"emoteSetId": "your_emote_set_id",
"emote": {
"emoteId": pepeW_v2
},
"zeroWidth": False,
"override": True
}
response = requests.post(url, json={"query": query, "variables": variables}, headers=headers)
# Check Response
if response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code} - {response.text}")
i get the error
... 'message': 'BAD_REQUEST this emote has a conflicting name', 'status': 409}}]}
Is this an error or am i doing something wrong?


