Initial structure for discordbot addition

This commit is contained in:
Jeremy Zhang 2017-05-02 18:37:24 +00:00
parent 2623724b0b
commit a6766b2008
43 changed files with 17 additions and 8 deletions

View File

@ -9,15 +9,10 @@ There was a time when Discord doesn't support embedding the chat on a webpage. B
- Moderation Features (Kick & ban users by IP addresses, toggling guest users)
- Discord OAuth support. (Allows those who have a discord account to access the embed)
- Responsive material design! (Thanks materializecss!!)
- All features are done via REST apis (respects discord's rate limiting). Although do not provide consistant connection to Discord, they are easier to maintain and does not often "disconnects" from Discord servers.
# Installation
Would you like to run your own copy of Titan Embeds?
1. Clone the repo (make sure you have python 2.7 installed on your system. This project depends on that specific python version)
2. Install the pip requirements `pip install -r requirements.txt`
3. Clone `config.example.py` and rename it to `config.py`. Edit the file to your standards
4. Make sure that the bot is online in the websockets once. This is required because the bot cannot send messages until it has used the ws. Use something like discord.py to log the bot into discord websockets. You can close it afterwards. So basically if the bot account is online ONCE in it's lifespan- you're good.
5. Run the development web via `python run.py` -- Though we suggest to use a better server software (look into gunicorn, nginx, uwsgi, etc)
Would you like to run your own copy of Titan Embeds? There are two parts that integrate nicely together. The webapp (website) handles the frontend and communication with the database to retrieve server messages, etc. The discordbot (bot) handles the communcation
between Discord's websockets and pushing out the data to the database for the webapp. Check out the respective folder for their installation (pay attention to the python versions!) instructions.
## Join us!

6
discordbot/README.md Normal file
View File

@ -0,0 +1,6 @@
# Titan - DiscordBot Portion
The DiscordBot portion handles the communcation with Discord's websockets to provide real-time updates. The bot's primary role is to push content to the webapp's database to be retrieved at a later time.
It also includes misc. features to moderate guest users, etc.
# Installation
1. TODO, Sorry about that! (Though if you want to get ahead, install the latest discord.py pip package and that will require **Python 3.5**)

8
webapp/README.md Normal file
View File

@ -0,0 +1,8 @@
# Titan - WebApp Portion
The webapp portion handles the frontend (it's what the users see). The webapp highly depends on the discordbot to push websockets data to the database.
# Installation
1. Clone the repo (make sure you have **Python 2.7** installed on your system. This webapp portion depends on that specific python version)
2. Install the pip requirements `pip install -r requirements.txt`
3. Clone `config.example.py` and rename it to `config.py`. Edit the file to your standards
4. Run the development web via `python run.py` -- Though we suggest to use a better server software (look into gunicorn, nginx, uwsgi, etc)

View File

@ -5,7 +5,7 @@ config = {
'client-secret': "Your discord client secret",
'bot-token': "Discord bot token",
'app-location': "/var/www/Titan/",
'app-location': "/var/www/Titan/webapp/",
'app-secret': "Type something random here, go wild.",
'database-uri': "driver://username:password@host:port/database",