mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-27 07:27:03 +01:00
add some features maybe?
This commit is contained in:
parent
9faef4f761
commit
0591aa583a
@ -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"
|
||||||
@ -10,7 +10,7 @@ cp ~/workspace/webapp/config.example.py ~/workspace/webapp/config.py
|
|||||||
cp ~/workspace/discordbot/config.example.py ~/workspace/discordbot/config.py
|
cp ~/workspace/discordbot/config.example.py ~/workspace/discordbot/config.py
|
||||||
cp ~/workspace/webapp/alembic.example.ini ~/workspace/webapp/alembic.ini
|
cp ~/workspace/webapp/alembic.example.ini ~/workspace/webapp/alembic.ini
|
||||||
|
|
||||||
echo "[C9Setup] Updating Python3.5"
|
echo "[C9Setup] Updating Python 3.5"
|
||||||
sudo add-apt-repository ppa:deadsnakes/ppa
|
sudo add-apt-repository ppa:deadsnakes/ppa
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install python3.5
|
sudo apt-get install python3.5
|
||||||
@ -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 *
|
||||||
|
|
||||||
|
@ -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",
|
||||||
}
|
}
|
||||||
|
@ -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()
|
||||||
|
@ -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()
|
||||||
|
@ -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",
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user