Last active
March 5, 2020 01:34
-
-
Save arvindrajnaidu/ce99a20ad7f6e8c1c5943d99aea6d465 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default ({id}) => new Promise((resolve, reject) => { | |
| try { | |
| Twitter.get('statuses/show', {id}, function(error, tweet) { | |
| // Is it the president? | |
| if (tweet.user.id_str !== '25073877') { | |
| return reject(error) | |
| } | |
| // Is he talking about me? | |
| if (tweet.entities.user_mentions[0].screen_name !== 'buzzarvind') { | |
| return reject(error) | |
| } | |
| // Unicef | |
| PayPalAccount('38938XA763AD') | |
| .send() | |
| .then(resolve) | |
| .catch(reject) | |
| } catch (e) { | |
| reject(e) | |
| } | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment