Dictionary command 400 characters limit

Asked Jan 13, 2023·2 replies·Last activity 3 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

First I have looked around for a simple dictionary command but could not find anything but...this


$(urlfetch https://api.dictionaryapi.dev/api/v2/entries/en/$(query))

Which runs into the problem of


[Response must be less than 400 characters]

When I try to run it

Now I know that there is some coding magic that can limit the response below 400. I mean probably. I have this urban dictionary command which works fine.

$(eval try{if(!decodeURIComponent($(querystring)))throw 0;a=$(urlfetch json http://api.urbandictionary.com/v0/define?term=$(querystring));b=a.list[0];(b.definition+ | +b.example).replace(/[\[\]]/g,`).replace(/[\n\r]/g, ).slice(0,400);}catch(e){No search result found!`;})

So. I really need help figuring this out. Or if there is an alternative. I can follow basic instructions but I'm not a programmer.

2 replies

That seemed to work. Thank you so much.