NightDev Community Forums

Grab function from pastebin

I would like to execute a function stored in a pastebin file. This is what I tried:

$(eval code=’$(urlfetch https://pastebin.com/raw/BNGGGwA9)’; F=new Function (code); return(F()))

The pastebin (for Testing):

if(5<6){‘Hi’}

Nightbot returns: right-hand side of ‘instanceof’ is not an object

@Habs_Hebs

$(eval function F(){$(urlfetch json https://pastebin.com/raw/pasteBin)}F())

The function on Pastebin should return a string with value Hi:

if(5<6){return `Hi`;}
1 Like

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