Help migrating custom command from Nightbot to PhantomBot

Java Version: 1.8.0_231-b11
OS Version: Windows 10 10.0 (x86)
Browser Version: Google Chrome Version 79.0.3945.117 (Official Build) (64-bit)
Panel Version: 1.0.0
PhantomBot Version: 3.0.0 (Revision: fcc08b51)
Stock PhantomBot: Yes

Hello! I’m currently migrating from Nightbot to PhantomBot and would love help making this command work! The goal is to get definitions from Urban Dictionary based on user requests.

!define (query)
Bot answers with Urban Dictionary Info

This code works perfectly with Nightbot, would love to migrate it to PhantomBot if anyone is willing to help!

$(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!;})

Thanks!

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