Wintermute's Weekend Workshop

@mafiabot unlynch

@Roragok Unlynched.

1 Like
robot.respond /open the (.*) doors/i, (res) ->
  doorType = res.match[1]
  if doorType is "pod bay"
     res.reply "I'm afraid I can't let you do that."
  else
     res.reply "Opening #{doorType} doors"

It looks like this is how they are passing args

As an aside I already think coffeescript is gross

We can pass the variable from there

But now I’m thinking you want also the player’s username, the thread info etc which means looking into how the bot works

Wonder what happens if you log out that res object

My other thought is that your ideas for this are redundant with some of my ideas for anything but this

Maybe it’s time to think about: do we really want to type. Do we really want a bot replying to things in mafia threads

yea its kinda cross but im almost done a poc

Jones what would you say would be a feature of this bot that you don’t consider boring and useless

I feel like im retarded. How do i get the data from a callback function to a parent function

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#scan-property

I can’t return this since the send function returns the aws request not the fucking results of the scan. it only gives me the scan in the callback function

I’m thinking maybe a feature that scans the site for Brendan posts and repeatedly likes and unlikes them on a 5 minute interval

Promises

Enjoy

does cofeescript do that and im not sure waht that shit is

That’s where I was at when I posted ā€œits time to retire javascriptā€ last weekend or the weekend before last

+1

There’s like 6 different libraries for fixing the way js handles asynchronous requests and at any given moment one will be deprecated and no longer supported and another will be es6 so only half its features work with aws

Then each framework (angular, react) has its own way of handling async behavior

And when you Google you will get little snippets randomly from the collection of different libraries

i just not sure why this aws function doesn’t let me return a fucking value.

Because it’s asynchronous!

i can get writing done. but to query and then return results to discourse is like apparently to confusing.

The way I solved it actually was a third party library I’d never heard of before and will never use again

Thing is these are all doing the same thing (solving the same problem in the same way) it’s just arbitrary syntax

I’d recommend reading until asynchronous javascript makes sense to you and then just picking the syntax randomly and see what works