Pastebin functionality with nightbot

I’ll be as clear as I can be, and I always appreciate the time you guys spend reading these messages. So at first and foremost, much love to the community!

I want to know how I might add a query string to pastebin via a command, so I can then use a different command to pull the query from whomever posted it, or by using “@user” to find their quote.

I want to use this to add a bunch of birthdays, since my current command just takes too many commands to accomplish.

This is what I currently use for reference

There are/is $(countdown 04 11 $(eval a=new Date;if(a.getMonth()>3||(a.getMonth()==3&&a.getDate()>=11)){c=a.getFullYear()+1;}else{c=a.getFullYear();}c) 00:00:00 MST) until April 11th!

I found this:
Is it a proper first step?

Should just pull random unless told where to look.

r=x=>x[Math.floor(Math.random()*x.length)];
a=`$(urlfetch json https://pastebin.com/raw/XXXXXXX)`.split(`;`).filter(a=>a);
parseInt(decodeURIComponent(`$(querystring)`),10)-1] || r(a)

Here is something I might try: let me know what you think if you’re following this <3

Trying my best

Should this allow me to pull user by name and list the birthday? Will test later if nobody replies. :slight_smile: Prepping for wife’s bday

r=x=>x[Math.floor(Math.random()*x.length)];
a=`$(urlfetch json https://pastebin.com/raw/XXXXXXXX)`.split(`;`).filter(a=>a);
let name=decodeURIComponent(`$(querystring)`);
let found=a.find(i=>i.startsWith(name));
found?found.split(` `)[1]:r(a);

Hey @drpi314159TTV!

This should help:

Let me know if you need more assistance, but you seem to manage well.

1 Like

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