yuhong90 / quoteme-bot Goto Github PK
View Code? Open in Web Editor NEWSimple telegram quote bot
Simple telegram quote bot
I was thinking of implementing a "shout board" kind of concept, which is more conversational. Currently the randomising of quotes sent to the board means lower visibility; users have not much control over what appears on the board. Also, we already have a quote bot created by someone in PAAS if I remember correctly.
I imagine it to work like "/shout anyone saw my mug at the pantry".
What do you think? @yuhong90
Any ideas how we can improve the view?
Right now all I'm thinking of is adding a sidebar to the view.
Also thinking of showing more quotes at once.
Perhaps store new submissions into another array in addition to the random quotes array
Thinking about how to organise the code and split out into several .js files.
Right off the bat we can split functions into another file, in which case we need a config object to pass common variables between external files. This would include the socket.io object and quote arrays we defined in telegram-bot.js.
Any comments?
We need to store quotes for occasions where the server crashes. We'll need this to store base-64 encoded images as well.
Postgres? Mongo/Parse? @yuhong90
We'll probably need to use local storage on the browser as well.
Need to make sure position:fixed works for the component and stick it at the bottom of the screen.
Perhaps convert each image to base64 string for storage; that'll allow it to be cacheable by the browser too.
e.g.
function storeQuote(user, name, content, time, profilePic, photo) {...}
IMO it's better to use a single object now that the project is starting to get a little more complex.
let quote = { userId: '', userName: '' ...}
function storeQuote(quote) {...}
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.