lambtron / bot-yearbook Goto Github PK
View Code? Open in Web Editor NEWSuperlatives slack bot.
License: Other
Superlatives slack bot.
License: Other
We need to do this after we create the logic that reads awards. Let's make it as easy as possible to add awards to it.
I'm thinking it would be neat to add new awards by adding it to a yaml file:
https://github.com/lambtron/bot-yearbook/blob/master/static/awards.yaml
That's just an example.
Thoughts?
How does the following logic work?
function Award(options) {
if (!(this instanceof Award)) return new Award(options);
this.awards = []; // global
this.currentStats = {}; // for tracking awards that are relative to other users
// { 'Andy': 'Poopiest poop', 'Etan': 'Derpiest' }
}
I'm unable to access those "global" variables. In fact, they only appear if you do Award() or this() since there aren't inherently objects.
Right now there is a file ./static/awards.yaml
.
I think it would be super nifty if we could easily create awards and their logic with that file. Something like:
name: "GOAT award"
- description: "This is the description"
criteria:
- emojis: 5 :monkey: 4 :heart_eyes:
words: 50
channels: 3
characters: NA
If we could create some syntax, then we can write logic that parses the yaml and it'll be super extensible (i think).
> db.users.find()
{ "_id" : ObjectId("5732b8156324f879e8b72467") }
>
what is that squirrely shit
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.