auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
if(steps.trigger.event.full_text.indexOf('queen me') === -1) $end('queen me not in tweet');
auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
const tracery = require('tracery-grammar');
const grammar = tracery.createGrammar({
"things":["Shadows","Night","the Sea","the Moon","Stars",
"the Sun","Kittens","Fear","Courage","Dancing",
"the Internet","Unicorns","Dolphins","Mermaids","Upstairs",
"Foxes","Puppies","Chairs","Trees","Plants",
"Flowers","Music","Singing","Painting","Song",
"Sparkles","Jewels","Intelligence","Smarts","Dragons",
"Wolves","Shoes","Bravery","Honesty","Empathy",
"Compassion","Wisdon","Knowledge","Cats","Storms",
"Lightning","Thunder","Rain","Snow","Clouds",
"Wind","the Earth","the Universe","the Galaxy","the Piano",
"the Sky","the Land","the Realm","the oceans","cookies",
"cakes","pies","macarons","pizza","parties"],
"role":["Defender","Champion","Scion","Empress","Sorceress",
"Master","Mistress","Boss","CEO","President",
"Prime Minister","DJ","Knight","Dame","Duchess",
"Baroness","Countess","Manager","Singer","Drummer",
"Muse","Siren","Painter","Crafter","Creator",
"Accountant","Chancellor","Jedi","Teacher","Jedi Master",
"Tutor"],
"origin":["the Queen of #things#, #role# of #things#, and #role# of #things#."]
});
grammar.addModifiers(tracery.baseEngModifiers);
this.sender = steps.trigger.event.user.screen_name;
this.message = '@' + this.sender + ' You are ' + grammar.flatten('#origin#');
console.log(this.message);
Text of the tweet you'd like to send
The ID of an existing status that the update is in reply to. Note: This parameter will be ignored unless the author of the Tweet this parameter references is mentioned within the status text. Therefore, you must include @username, where username is the author of the referenced Tweet, within the update.
async
(params, auths) => {
}
const Twit = require('twit')
const { api_key, api_secret_key, access_token, access_token_secret } = auths.twitter_developer_app
const T = new Twit({
consumer_key: api_key,
consumer_secret: api_secret_key,
access_token,
access_token_secret,
timeout_ms: 60 * 1000, // optional HTTP request timeout to apply to all requests.
strictSSL: true, // optional - requires SSL certificates to be valid.
})
return await T.post('statuses/update', { status: params.status, in_reply_to_status_id: params.in_reply_to_status_id })