Cleanup et .gitignore

1) Cleanup de la source car inconsistance relevée par Python
2) Gitignore car je sentais un accident arriver
This commit is contained in:
l4p1n 2018-02-17 00:38:04 +01:00
parent 12b8f79093
commit ab4de2748b
3 changed files with 9 additions and 4 deletions

5
.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
.idea
*.db
params.json
logs/*.log
*.pyc

8
bot.py
View file

@ -74,8 +74,8 @@ async def on_ready():
print('Merci d\'utiliser TuxBot')
print('---------------------')
await bot.change_presence(game=discord.Game(name=credentials.get("game", "Manger des pommes | .help")), status=discord.Status("dnd"), afk=False)
if bot.client_id == None:
bot.client_id = bot.user.id
if bot.client_id == None:
bot.client_id = bot.user.id
if not hasattr(bot, 'uptime'):
bot.uptime = datetime.datetime.utcnow()
@ -125,8 +125,8 @@ if __name__ == '__main__':
try:
credentials = load_credentials()
token = credentials.get('token')
if token is None:
print("/!\ Le token est manquant dans le fichier params.json...")
if token is None:
print("/!\ Le token est manquant dans le fichier params.json...")
bot.client_id = credentials.get('client_id', None)
except:
print("Impossible de démarer TuxBot dû à une erreur inconnue.")