소스 검색

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

tags/v1.4.0
roxie 6 년 전
부모
커밋
7f49641f70
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. +3
    -1
      config/server_config.py
  2. +2
    -2
      load_config.py

+ 3
- 1
config/server_config.py 파일 보기



def error_check(self, servers): def error_check(self, servers):
for server in 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.servers[server.id] = self.servers_template["example"]
self.update_config(self.servers) self.update_config(self.servers)
print( print(

+ 2
- 2
load_config.py 파일 보기



command_prefix = settings["Roxbot"]["Command_Prefix"] command_prefix = settings["Roxbot"]["Command_Prefix"]
token = settings["Roxbot"]["Token"] token = settings["Roxbot"]["Token"]
owner = settings["Roxbot"]["OwnerID"]
owner = int(settings["Roxbot"]["OwnerID"])
tat_token = settings["Roxbot"]["Tatsumaki_Token"] 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) [Github link](https://github.com/RainbowDinoaur/roxbot)
[Changelog](https://github.com/RainbowDinoaur/roxbot#v100)""" [Changelog](https://github.com/RainbowDinoaur/roxbot#v100)"""

Loading…
취소
저장