mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-22 15:05:47 +02:00
parent
418dc41126
commit
7e5c4031c0
8 changed files with 67 additions and 1 deletions
5
files/default/hangman.json
Normal file
5
files/default/hangman.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"guessed": [],
|
||||
"guesses": 0,
|
||||
"word": ""
|
||||
}
|
||||
9
files/default/lastTasks.json
Normal file
9
files/default/lastTasks.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"interest": 0,
|
||||
"lost": 0,
|
||||
"poke": 0,
|
||||
"prison": 0,
|
||||
"birthdays": 0,
|
||||
"channels": 0,
|
||||
"remind": 0
|
||||
}
|
||||
4
files/default/locked.json
Normal file
4
files/default/locked.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"locked": false,
|
||||
"until": -1
|
||||
}
|
||||
4
files/default/lost.json
Normal file
4
files/default/lost.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"lost": 0,
|
||||
"today": 0
|
||||
}
|
||||
19
files/default/stats.json
Normal file
19
files/default/stats.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"cf": {
|
||||
"h": 0,
|
||||
"t": 0
|
||||
},
|
||||
"dice": {
|
||||
"2": 0,
|
||||
"5": 0,
|
||||
"3": 0,
|
||||
"6": 0,
|
||||
"1": 0,
|
||||
"4": 0
|
||||
},
|
||||
"rob": {
|
||||
"robs_success": 0,
|
||||
"robs_failed": 0,
|
||||
"bail_paid": 0.0
|
||||
}
|
||||
}
|
||||
12
files/default/ufora_notifications.json
Normal file
12
files/default/ufora_notifications.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"Algoritmen en Datastructuren 2": [],
|
||||
"Communicatienetwerken": [],
|
||||
"Computerarchitectuur": [],
|
||||
"Functioneel Programmeren": [],
|
||||
"Multimedia": [],
|
||||
"Software Engineering Lab 1": [],
|
||||
"Statistiek en Probabiliteit": [],
|
||||
"Systeemprogrammeren": [],
|
||||
"Webdevelopment": [],
|
||||
"Wetenschappelijk Rekenen": []
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
from discord.ext import commands, ipc
|
||||
from settings import HOST_IPC
|
||||
from startup.init_files import check_all
|
||||
import os
|
||||
|
||||
|
||||
|
|
@ -22,8 +23,12 @@ class Didier(commands.Bot):
|
|||
# Remove default help command
|
||||
self.remove_command("help")
|
||||
|
||||
# Load all extensions
|
||||
self.init_extensions()
|
||||
|
||||
# Check missing files
|
||||
check_all()
|
||||
|
||||
def init_extensions(self):
|
||||
# Load initial extensions
|
||||
for ext in self._preload:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
import json
|
||||
from os import path
|
||||
|
||||
|
||||
def check_all():
|
||||
pass
|
||||
files = ["hangman", "lastTasks", "locked", "lost", "stats", "ufora_notifications"]
|
||||
|
||||
for f in files:
|
||||
if not path.isfile(path.join(f"files/{f}.json")):
|
||||
with open(f"files/{f}.json", "w+") as new_file, open(f"files/default/{f}.json", "r") as default:
|
||||
content = json.load(default)
|
||||
json.dump(content, new_file)
|
||||
print(f"Created missing file: files/{f}.json")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue