-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py.example
54 lines (40 loc) · 1.39 KB
/
config.py.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import json
# set your bot token here (https://discord.com/developers)
BOT_TOKEN = ''
# set to True if bot is in maintenance mode
MAINTENANCE = False
# set your prefix
BOT_PREFIX = '!'
# set the bot administrator (your personal userID)
BOT_ADMIN = 000000000000000
# set your openai key here (https://platform.openai.com/api-keys)
BOT_OPENAI_KEY = ''
BOT_CHATGPT_MODEL = 'gpt-4-vision-preview'
BOT_DALLE_MODEL = 'dall-e-3'
# youtube api key (https://developers.google.com/youtube/v3)
BOT_YOUTUBE_KEY = ''
# spotify api (https://developer.spotify.com/)
BOT_SPOTIFY_CLIENT = ''
BOT_SPOTIFY_SECRET = ''
# maximum playlist legnth
MUSIC_MAX_PLAYLIST = 20
# maximum song length
MUSIC_MAX_DURATION = 1800
# radio queue length (how many songs should radio queue at a time)
RADIO_QUEUE = 5
####################################################################
# !! DON'T MODIFY BELOW ME !! DON'T MODIFY BELOW ME !! #
####################################################################
def LoadSettings():
try:
with open('settings.json', 'r') as file:
return json.load(file)
except FileNotFoundError:
with open('settings.json', 'w') as file:
default = {}
json.dump(default, file, indent=4)
return default
def SaveSettings():
with open('settings.json', 'w') as file:
json.dump(settings, file, indent=4)
settings = LoadSettings()