#mutation addEmote overrideConflicts not working

1 messages · Page 1 of 1 (latest)

gleaming nacelle
#

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?

rigid fulcrum
#

@stoic venture catAsk

#

I feel like you would know the answer to this

daring brook
#

i think he still uses v3 for this

#

but i tried it aswell and it gives the same error

stoic venture
gleaming nacelle
#

that seems somewhat pointless

stoic venture
#

it doesn't override anything

gleaming nacelle
#

i see. its odd cuz when add an emote of the same name on the old 7tv site it resolves conflicts with a button.

#

guess i'll have to code around it

gleaming nacelle
stoic venture
#

i would use gql to get the emotes as well

rigid fulcrum
#

W ryan

stoic venture
#

the REST api is cached behind cloudflare and can be ~10-20 minutes out of date

gleaming nacelle
stoic venture
#

well gql is all post never get so thats why i assumed you meant rest Alright

gleaming nacelle
#

oh fr. i thought mutation was just POST

#

and query was get

#

im new to gql