I made a twitter bot and it's working. But it's a bunch of nested logic that I would like to refactor into functions.
I have this twitter API call and I want to return the reply parameter,
T.get('trends/place', { id: '23424977' }, function(err, reply) {
// THE WHOLE APP IS BASICALLY IN HERE
{
It won't let me name the function like
T.get('trends/place', { id: '23424977' }, function getTrends(err, reply) {
// THE WHOLE APP IS BASICALLY IN HERE
{
I messed around with some other ideas but no luck.
The whole bot is here https://glitch.com/edit/#!/trending-mishap?path=server.js