hash-gaming / robotk Goto Github PK
View Code? Open in Web Editor NEWMostly helpful but sometimes trolly
License: MIT License
Mostly helpful but sometimes trolly
License: MIT License
As a user, I'd like to be able to schedule a gaming session with fellow users for a specified time and game
@randbot
will automatically notify participants when its time to game@randbot sessions schedule [game] at [time]
will create a new gaming session@randbot sessions join [game] at [time]
will add that user to the game session@randbot sessions list
will list out the upcoming game sessionsRight now, msg.http
calls use Node.js style callbacks to do async operations. This can lead to callback hell if we start nesting callbacks so we will need promises sooner than later. Example below
// Callback hell
msg.http(url).get()((err1, res1, body1) => {
if (err1) {
msg.send('something has gone wrong');
}
else {
msg.http(anotherUrl).get()(err2, res2, body2) => {
if (err2) {
msg.send('something has gone wrong');
}
else {
msg.http(yetAnotherUrl).get()(err3, res3, body3) => {
// now we have all the data if there is no error
if (err3) {
msg.send('something has gone wrong');
}
else {
msg.send(body3);
}
});
}
});
}
});
// With promises - assume that a function called fetch() is available
fetch(url).then(body => {
return fetch(anotherUrl);
}).then(body => {
return fetch(yetAnotherUrl);
}).then(body => {
msg.send(body);
}).catch(e => msg.send('something has gone wrong'));
Much cleaner and much easier to read and it comes with a error handler built in just like a synchronous try/catch
block.
Plus the http library that hubot is using is unmaintained.
As a new User, I want to be greeted with a welcome message and the rules of the community so that I can participate effectively.
As a User, I'd like to be able to ask randbot to aggregate reviews for me
@randbot review [game]
should give me an aggregated list of reviewsRoboTK is a much better name, lets rename this bot.
As an admin/owner I'd like the ability to ban users or mute them
@randbot mute @user 10 minutes
should make the bot delete ALL of the user's posts in a public channel auto delete for 10 minutes@randbot ban @user
should deactivate the user's account$ npm run linter
> [email protected] linter /home/travis/build/hash-gaming/robotk
> eslint .
/home/travis/build/hash-gaming/robotk/tests/general.spec.js
17:25 warning Unexpected unnamed generator function 'bind' func-names
/home/travis/build/hash-gaming/robotk/tests/lit.spec.js
18:25 warning Unexpected unnamed generator function 'bind' func-names
31:25 warning Unexpected unnamed generator function 'bind' func-names
/home/travis/build/hash-gaming/robotk/tests/pugme.spec.js
17:25 warning Unexpected unnamed generator function 'bind' func-names
29:25 warning Unexpected unnamed generator function 'bind' func-names
โ 5 problems (0 errors, 5 warnings)
As a User, I'd like to be able to tell randbot to make a post to the #lit channel
https://hashtaggaming.slack.com/archives/
@randbot lit [link]
should post that link to the #lit channelPrerequisite is #13 but once that is merged, we should add
[![Build Status](https://travis-ci.org/hash-gaming/randbot.svg?branch=master)](https://travis-ci.org/hash-gaming/randbot)
to README.md
.
As a User, I'd like to be able to ask randbot to have knack related features
@randbot knack me
should give me a knack gif@randbot knack bomb [X]
should give me up to 10 knack gifsA 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.