Easy Bot Customisation.
bot customisation options like username, hastags to watch should be declared in config.json so they can be modified by anyone easily.
The current functionality is customizable and this is one approach of using the twitter bot. Its not required for setting up the twitter bot or for configuring it.
The features you add are purely a decision made by the developer, as such he/she can add a new feature that uses username, hastag to watch or remove them altogether.
Configurations are kept separate so as to separate the logic of setting up the twitter bot and the feature set (which is dependent on the dev).
what i meant was something like this:
// Put your own Twitter App keys here. See README.md for more detail.
module.exports = {
consumer_key: 'blah',
consumer_secret: 'blah',
access_token: 'blah',
access_token_secret: 'blah'
hashtags_to_watch: ['abc','xyz','anotherTag']
users: 'username'
}
so if someone wants to use it in their project, just modify the config without knowledge of code.
@gogeta95 understood. But you need to see the difference I am talking about. This is a feature not configuration. Its not necessary to setup the twitter bot, the bot is customizable. If however you think that you want to stick with what the bot does and would like to have it as central location to change, create another similar file as config file and export the variables so that they can be modified from a central location.
I do not see see typecasting this code base to one specific type of features , rather would be good to have modular features which is what you are suggesting. But in no case should they be mixed up with configuration information.
how to retweet only english language?