-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added config file and refactored some core features
- Fixed missing format function in Redunda error logging - Added a config file (closes #9) - Refactored chat helper class to utils class and removed unneeded getters and setters (too much java recently, still damaged by that) - Refactored ranks file - Fixed announcing of the last flag rank (#11)
- Loading branch information
Showing
6 changed files
with
142 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
Is this file are the configurations for debug and production mode defined. In the debug config is also explained for what the properties are for | ||
""" | ||
|
||
debugConfig = { | ||
"botParent": "chade_", # The person which is responsible for running the instance (e.g. you if you're running your own instance) | ||
"botMachine": "HP Envy (dev machine)", # The machine the bot runs on. Try to give it something easy to identify (I use the manufacturer and model name of my machine for development, and the distribution name for the productive server) | ||
"botVersion": "v0.7.0", # The current version of the Bot, be sure to read the wiki on how to increment the version | ||
"room": 163468, # The ID for the chatroom we work with. | ||
"chatHost": "stackoverflow.com", # The site where the bot runs. Please note that the bot has only been tested in rooms on stackoverflow.com | ||
"email": "", # The credentials to log in a user which posts the messages. | ||
"password": "", # WARNING: DO NOT COMMIT YOUR CHANGES IF YOUR CREDENTIALS ARE STILL IN HERE | ||
"stackExchangeApiKey": "K8pani4F)SeUn0QlbHQsbA((", # If you want to run the bot productively on your own, you may request a API key for yourself. | ||
"redundaKey": "19b558436329ff6eb8247bc21fdd2aaa1135597b5bb858a10e8eef2688b8565e" # If you want to have a key on your own, ping me so I so we can discuss the situation (because I may need to add you as collaborator in order to create a key that show the bot of with you as the owner) | ||
} | ||
|
||
prodConfig = { | ||
"botParent": "chade_", # The person which is responsible for running the instance (e.g. you if you're running your own instance) | ||
"botMachine": "UbuntuServer", # The machine the bot runs on. Try to give it something easy to identify (I use the manufacturer and model name of my machine for development, and the distribution name for the productive server) | ||
"botVersion": "v0.7.0", # The current version of the Bot, be sure to read the wiki on how to increment the version | ||
"room": 111347, | ||
"chatHost": "stackoverflow.com", # The site where the bot runs. Please note that the bot has only been tested in rooms on stackoverflow.com | ||
"email": "", # The credentials to log in a user which posts the messages. | ||
"password": "", # WARNING: DO NOT COMMIT YOUR CHANGES IF YOUR CREDENTIALS ARE STILL IN HERE | ||
"stackExchangeApiKey": "K8pani4F)SeUn0QlbHQsbA((", # If you want to run the bot productively on your own, you may request a API key for yourself. | ||
"redundaKey": "1edfa96cf4edac49271759220c029a35c21fddda3e1fb28d82ec6bcba6dd6c7a" # If you want to have a key on your own, ping me so I so we can discuss the situation (because I may need to add you as collaborator in order to create a key that show the bot of with you as the owner) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
ranks = { | ||
"365": { | ||
ranks = [ | ||
{ | ||
"count": 365, | ||
"title": "A flag a day keeps bad posts away", | ||
"description": "One year has 365 days", | ||
"count": 365 | ||
"description": "One year has 365 days" | ||
}, | ||
"1111": { | ||
{ | ||
"count": 1111, | ||
"title": "No badge needed", | ||
"description": "A number is prettier than a badge anyway!", | ||
"count": 1111 | ||
"description": "A number is prettier than a badge anyway!" | ||
}, | ||
"2008": { | ||
{ | ||
"count": 2008, | ||
"title": "Flag Overflow", | ||
"description": "Stack Overflow was created in 2008", | ||
"count": 2008 | ||
"description": "Stack Overflow was created in 2008" | ||
}, | ||
"10000": { | ||
{ | ||
"count": 10000, | ||
"title": "Elite Squad", | ||
"description": "At one point of time, there were only 16 of us", | ||
"count": 10000 | ||
"description": "At one point of time, there were only 16 of us" | ||
}, | ||
"11111": { | ||
{ | ||
"count": 11111, | ||
"title": "Game of Flags", | ||
"description": "All elevens because the TV show Game of Thrones started in 2011", | ||
"count": 11111 | ||
"description": "All elevens because the TV show Game of Thrones started in 2011" | ||
}, | ||
"22656": { | ||
{ | ||
"count": 22656, | ||
"title": "Almost Jon Skeet", | ||
"description": "22656 is his (John's) user ID", | ||
"count": 22656 | ||
"description": "22656 is his (John's) user ID" | ||
}, | ||
"33333": { | ||
{ | ||
"count": 33333, | ||
"title": "The Mad Flagger", | ||
"description": "Got nothing better to do with your time? ;D", | ||
"count": 33333 | ||
"description": "Got nothing better to do with your time? ;D" | ||
}, | ||
"42195": { | ||
{ | ||
"count": 42195, | ||
"title": "The Marathon", | ||
"description": "Marathon's length in meters", | ||
"count": 42195 | ||
"description": "Marathon's length in meters" | ||
}, | ||
"65536": { | ||
{ | ||
"count": 65536, | ||
"title": "The two to the sixteen", | ||
"description": None, | ||
"count": 65536 | ||
"description": None | ||
}, | ||
"101010": { | ||
{ | ||
"count": 101010, | ||
"title": "Definitely a robot", | ||
"description": "42 in binary code. [Also 42 is the Answer to the Ultimate Question of Life, the Universe, and Everything](https://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker%27s_Guide_to_the_Galaxy#Answer_to_the_Ultimate_Question_of_Life,_the_Universe,_and_Everything_(42))", | ||
"count": 101010 | ||
"description": "42 in binary code. [Also 42 is the Answer to the Ultimate Question of Life, the Universe, and Everything](https://en.wikipedia.org/wiki/Phrases_from_The_Hitchhiker%27s_Guide_to_the_Galaxy#Answer_to_the_Ultimate_Question_of_Life,_the_Universe,_and_Everything_(42))" | ||
}, | ||
"2147483647": { | ||
{ | ||
"count": 2147483647, | ||
"title": "The Overflow", | ||
"description": "[Maximum size of a 32-bit integer](https://stackoverflow.com/a/94608)", | ||
"count": 2147483647 | ||
"description": "[Maximum size of a 32-bit integer](https://stackoverflow.com/a/94608)" | ||
}, | ||
"4294967296": { | ||
{ | ||
"count": 4294967296, | ||
"title": "A `long` journey", | ||
"description": None, | ||
"count": 4294967296 | ||
"description": None | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.