NightDev Community Forums

Using cyrillic alphabet as $(query)

Good evening,

I have created a pastebin file that pulls a line by use of a word in the cyrillic alphabet as $(query) but this returns in an ‘Error connecting to remote server’. When just testing to add a word in that same file with the latin alphabet I do get a return.

Is it possible to get the cyrillic alphabet to work aswel? Really would like not to have to edit 10k lines hahhaa.

Thanks in advance.

With kind regards,
KvdO

Can you share the pastebin link? Also are you using the raw link?

1 Like

I am not using the RAW link, no
Eng-Rus - Pastebin.com that’s the pastebin link.
Im probably doing a lot of things wrong :stuck_out_tongue:

(edit: its not the exact link for I changed all cyrillic letters to latin anyway. The return works, but when using the cyrillic in place of the latin alphabet it doesnt seem to)

Ok well the link you gave does work and you should be using the raw link so it only outputs text. What exactly are you trying to do? Is it a translation command? Can you show me the command code/message the return your getting means there is no output being returned at all in most instances.

The raw file: https://pastebin.com/raw/aH8Xxvj6
The command: $(urlfetch https://api.thefyrewire.com/twitch/pastebin/aH8Xxvj6?filter=$(query))
KvdO89: ruseng опешить
Nightbot: Error Connecting To Remote Server
but if I use replace it with latin letters it does work:
KvdO89: !rus-eng opesit
Nightbot: aback

Thats pretty much the entire thing

Oh I didn’t realize you were using an API endpoint what does this api do? The problem would appear to be that it just outputs plain text if it can’t find what you are searching for. You could probably make your own eval that filters it for you but that depends on exactly what the api does.

I use the api filter=$(query) to filter on the input word (which is :[] in the pastbin file. So typing a single word would return the translation.
I have tried to find documentation on how to work with the eval but I can’t find the detailed info I would need to try such a command.

Ok so your pastebin wouldn’t work with eval anyways as it’s over 9000 items long however I made an api endpoint that should do exactly as you desire

English => Russian

$(urlfetch https://production.pcatch.potatoeaterlove.workers.dev/filter?paste=GZfVUHc2&split=:&query=$(querystring))

Russian => English

$(urlfetch https://production.pcatch.potatoeaterlove.workers.dev/filter?paste=aH8Xxvj6&split=:&query=$(querystring))

Oh thats great, thank you very much.
I wish I could figure it out for myself. Would the part >>filter?paste=GZfVUHc2&split=:&query=$(querystring))<< work for every pastebin created in this fashion?

Again, thanks for getting this to work

Yes if you replace the paste=____ with any valid pastebin code in that fashion it will work you don’t need the [ or ] though just this fashion

:word1 word_translation1
:word2 word_translation2
:wordX word_translationX…

Yea thats what I figured, thanks a lot for that… again…
Which brings me to the point where I hate myself for even asking any more… Yet… here goes…
If I now input ‘Hello’ as query, I dont get the return Привет. I must use a lower case ‘hello’. If this is a simple fix in the command line I dare ask- if it’s to much work please do not bother.

Everything thusfar has been much appreciated

Yeah simple fix I forgot to include the case insensitive tag in the match should match Hello to hello now

edited: tested this and luckily all /commands dont work like that.