add some features maybe?

This commit is contained in:
Max Choi-Deyoung 2018-07-16 17:34:08 -04:00
parent 9faef4f761
commit 0591aa583a
6 changed files with 37 additions and 37 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
echo "[C9Setup] Installing postgresql, redis, and creating titan db table" echo "[C9Setup] Installing PostGreSQL, redis, and creating titan db table"
cd ~/workspace/ cd ~/workspace/
sudo service postgresql start sudo service postgresql start
psql -c "CREATE DATABASE titan WITH ENCODING 'UTF8' TEMPLATE template0" psql -c "CREATE DATABASE titan WITH ENCODING 'UTF8' TEMPLATE template0"
@ -39,7 +39,7 @@ sed -i "20s/.*/\'app-location\': \"\/home\/ubuntu\/workspace\/webapp\/\",/" ~/wo
#'webosockets-mode': "eventlet", #'webosockets-mode': "eventlet",
sed -i "25s/.*/\'websockets-mode\': \"eventlet\",/" ~/workspace/webapp/config.py sed -i "25s/.*/\'websockets-mode\': \"eventlet\",/" ~/workspace/webapp/config.py
echo "[C9Setup] Making sure everything can be ran" echo "[C9Setup] Testing..."
cd ~/workspace/ cd ~/workspace/
sudo chmod -R 777 * sudo chmod -R 777 *

View File

@ -1,13 +1,13 @@
config = { config = {
'bot-token': "Discord bot token", 'bot-token': "Bot - Token",
'database-uri': "driver://username:password@host:port/database", 'database-uri': "driver://username:password@host:port/database",
'redis-uri': "redis://", 'redis-uri': "redis://",
'discord-bots-org-token': "DiscordBots.org Post Stats Token", 'discord-bots-org-token': "DiscordBots.org - Token",
'bots-discord-pw-token': "bots.discord.pw Post Stats Token", 'bots-discord-pw-token': "Discord Bots - Token",
'logging-location': "/home/titan/Titan/discordbot/titanbot.log", 'logging-location': "/home/titan/Titan/discordbot/titanbot.log",
} }

View File

@ -2,7 +2,7 @@ from titanembeds import Titan
import gc import gc
def main(): def main():
print("Starting...") print("Starting bot...")
te = Titan() te = Titan()
te.run() te.run()
gc.collect() gc.collect()

View File

@ -47,7 +47,7 @@ class Titan(discord.AutoShardedClient):
try: try:
self.loop.run_until_complete(self.start()) self.loop.run_until_complete(self.start())
except discord.errors.LoginFailure: except discord.errors.LoginFailure:
print("Invalid bot token in config!") print("Invalid bot token inside of the config!")
finally: finally:
try: try:
self._cleanup() self._cleanup()

View File

@ -1,9 +1,9 @@
config = { config = {
# Create an app over here https://discordapp.com/developers/applications/me # Create an app over here https://discordapp.com/developers/applications/me
# and fill these fields out # and fill these fields out
'client-id': "Your app client id", 'client-id': "Bot - Client ID",
'client-secret': "Your discord client secret", 'client-secret': "Bot - Secret",
'bot-token': "Discord bot token", 'bot-token': "Bot - Token",
# Rest API in https://developer.paypal.com/developer/applications # Rest API in https://developer.paypal.com/developer/applications
'paypal-client-id': "Paypal client id", 'paypal-client-id': "Paypal client id",
@ -26,5 +26,5 @@ config = {
'engineio-logging': False, 'engineio-logging': False,
# https://titanembeds.com/api/webhook/discordbotsorg/vote # https://titanembeds.com/api/webhook/discordbotsorg/vote
'discordbotsorg-webhook-secret': "Secret code used in the authorization header for DBL webhook", 'discordbotsorg-webhook-secret': "Secret Code - Authencation Header",
} }