Development (#16)
* heroku yml * owner list from env * bot key from enviroment var * app json * heroku button * again * Update README.md * fixing syntax hopefully * error fixing * enviroments added * opsy forgot a } * trying again * Update app.json * Update app.json * Update app.json * Update app.json * Update app.json * Update __main__.py * Update app.json * Update __main__.py * removed prints
This commit is contained in:
parent
523485461f
commit
88f2c4d087
@ -60,4 +60,4 @@ If you are stuck in any way shape or form you can always contact anyone who work
|
|||||||
- http://discord.gg/GWdhBSp
|
- http://discord.gg/GWdhBSp
|
||||||
- http://chillout.ueuo.com
|
- http://chillout.ueuo.com
|
||||||
- http://trello.com/b/x02goBbW/sebis-bot-tutorial-roadmap
|
- http://trello.com/b/x02goBbW/sebis-bot-tutorial-roadmap
|
||||||
|
[](https://heroku.com/deploy?template=https://github.com/Raatty/Sebi-Machine/tree/development)
|
||||||
|
|||||||
15
app.json
Normal file
15
app.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name":"sebi-machine",
|
||||||
|
"stack":"container",
|
||||||
|
"env": {
|
||||||
|
|
||||||
|
"ownerlist": {
|
||||||
|
"description": "comma seperated list of owner ids",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"botkey": {
|
||||||
|
"description": "bot token",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
3
heroku.yml
Normal file
3
heroku.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
build:
|
||||||
|
docker:
|
||||||
|
worker: dockerfile
|
||||||
@ -10,6 +10,7 @@ import json
|
|||||||
import logging
|
import logging
|
||||||
import random
|
import random
|
||||||
import traceback
|
import traceback
|
||||||
|
import os
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
@ -98,4 +99,7 @@ client = SebiMachine()
|
|||||||
# I am 99% certain this is valid!
|
# I am 99% certain this is valid!
|
||||||
with open(in_here('config', 'PrivateConfig.json')) as fp:
|
with open(in_here('config', 'PrivateConfig.json')) as fp:
|
||||||
PrivateConfig = json.load(fp)
|
PrivateConfig = json.load(fp)
|
||||||
|
if PrivateConfig["bot-key"] == '':
|
||||||
|
PrivateConfig["bot-key"] = os.getenv('botkey')
|
||||||
|
|
||||||
client.run(PrivateConfig["bot-key"])
|
client.run(PrivateConfig["bot-key"])
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
import discord
|
import discord
|
||||||
|
import os
|
||||||
|
|
||||||
class LoadConfig:
|
class LoadConfig:
|
||||||
"""
|
"""
|
||||||
@ -14,7 +15,10 @@ class LoadConfig:
|
|||||||
self.config = json.load(fp)
|
self.config = json.load(fp)
|
||||||
|
|
||||||
# Initialize config
|
# Initialize config
|
||||||
|
if self.config["ownerlist"] != []:
|
||||||
self.ownerlist = self.config["ownerlist"]
|
self.ownerlist = self.config["ownerlist"]
|
||||||
|
else:
|
||||||
|
self.ownerlist = [int(i) for i in os.getenv('ownerlist').split(',')]
|
||||||
self.defaultprefix = self.config["prefix"]
|
self.defaultprefix = self.config["prefix"]
|
||||||
self.version = self.config["version"]
|
self.version = self.config["version"]
|
||||||
self.display_name = self.config["display_name"]
|
self.display_name = self.config["display_name"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user