NightDev Community Forums

Check Duplicate entry before adding quote in the list

Hello rocket bro,
I just want to know, How can I check duplicate entry while send !addquote command.

I mean if there is already entry in quote list,
it must return : already exist

#and when i use !quote command it returns
random entry : 3. xloss

I want to remove that number, and show entry only.

@xloss

Duplicate entry check. Note: this check is case sensitive. Replace PUBLIC_TOKEN with your public token and PRIVATE_TOKEN with your private token:

!addcom -ul=mod !addquote -a=_!addquote $(eval a=decodeURIComponent(`$(querystring)`);`$(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&data=$(querystring))`!=a?`PRIVATE_TOKEN&data=${a}`:`PRIVATE_TOKEN`)

!addcom -ul=mod _!addquote $(eval a=`$(urlfetch https://twitch.center/customapi/addquote?token=$(query))`;b=decodeURIComponent(`$(querystring)`);b.includes(`PRIVATE_TOKEN`)?(a.includes(`Success`)?a:`Already exists!`):` `)

Showing a quote without its list ID:

!addcom -cd=5 !quote $(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&no_id=1)
1 Like

bro thanks:stuck_out_tongue:

!addcom -ul=mod _!addquote $(eval a=`$(urlfetch https://twitch.center/customapi/addquote?token=$(query))`;b=decodeURIComponent(`$(querystring)`);b.includes(`PRIVATE_TOKEN`)?(a.includes(`Success`)?a:`Already exists!`):` `)

for this alias command i want to show custom repsonce,
when we add : “added successfully”
if exist : “Already exists!”

$(eval a=`$(urlfetch https://twitch.center/customapi/addquote?token=$(query))`;b=decodeURIComponent(`$(querystring)`);b.includes(`PRIVATE_TOKEN`)?$(urlfetch json https://pastebin.com/raw/TzkLsD9c))

Hey bro, can u check this alias command again ?
it is not adding new entry in quote list , and it says already exist for every unique entry

$(eval a=`$(urlfetch https://twitch.center/customapi/addquote?token=$(query))`;b=decodeURIComponent(`$(querystring)`);b.includes(`PRIVATE_TOKEN`)?$(urlfetch json https://pastebin.com/raw/TzkLsD9c))

must show $(user) already exist
and $(user) added successfully

Fixed commands:

!addcom -ul=mod !addquote -a=_!addquote $(eval a=decodeURIComponent(`$(querystring)`);`$(urlfetch https://twitch.center/customapi/quote?token=PUBLIC_TOKEN&data=$(querystring)&no_id=1)`!=a?`PRIVATE_TOKEN&data=${a}`:`PRIVATE_TOKEN`)

!addcom -ul=mod _!addquote $(eval a=`$(urlfetch https://twitch.center/customapi/addquote?token=$(query))`;b=decodeURIComponent(`$(querystring)`);b.includes(`PRIVATE_TOKEN`)?$(urlfetch json https://pastebin.com/raw/TzkLsD9c))

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.