!newtopic command

I would like to create a command where nightbot pulls a word from a list from a document (wherever i host it online) to create a topic to talk about.

Like !newtopic suggestion
outcome: Nightbot suggest to change the topic to (random suggestion from the list)

is that possible to say host a list with random words that can be used for this command?

Yes make sure what ever your using can return the words in plain text format.
Make sure you list looks like this

[`Topic1`,
`Topic2`,
`Topic3`,
...]

The ` and [] and , are important to how it reads the array make sure to keep them.

You can then set the array equal to let’s say Topic then you would do this to get a random output:

$(eval Topic=$(urlfetch json LINK);Topid[Math.floor(Math.random()*Topic.length)])

LINK is the link that output the information in plain text. It is possible to pull information other ways but it simplest to just make sure it’s plain text. <3

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