Browse Source

have to make sure server ids are converted to strings when checking the config.

tags/v1.4.0
roxie 6 years ago
parent
commit
7f49641f70
2 changed files with 5 additions and 3 deletions
  1. +3
    -1
      config/server_config.py
  2. +2
    -2
      load_config.py

+ 3
- 1
config/server_config.py View File

@@ -62,7 +62,9 @@ class ServerConfig():

def error_check(self, servers):
for server in servers:
if server.id not in self.servers:
# Server ID needs to be made a string for this statement because keys have to be strings in JSON. Which is annoying now we use int for ids.
server.id = str(server.id)
if str(server.id) not in self.servers:
self.servers[server.id] = self.servers_template["example"]
self.update_config(self.servers)
print(

+ 2
- 2
load_config.py View File

@@ -5,11 +5,11 @@ settings.read("settings/preferences.ini")

command_prefix = settings["Roxbot"]["Command_Prefix"]
token = settings["Roxbot"]["Token"]
owner = settings["Roxbot"]["OwnerID"]
owner = int(settings["Roxbot"]["OwnerID"])
tat_token = settings["Roxbot"]["Tatsumaki_Token"]


__description__ = """RoxBot, A Discord Bot made by a filthy Mercy Main. Built with love (and discord.py) by Roxxers#7443.
description = """RoxBot, A Discord Bot made by a filthy Mercy Main. Built with love (and discord.py) by Roxxers#7443.

[Github link](https://github.com/RainbowDinoaur/roxbot)
[Changelog](https://github.com/RainbowDinoaur/roxbot#v100)"""

Loading…
Cancel
Save