Formatted with black
This commit is contained in:
@@ -6,12 +6,12 @@ with open("config.json", "r", encoding="utf-8") as f:
|
||||
f.close()
|
||||
|
||||
db_client = MongoClient(
|
||||
'mongodb://{0}:{1}@{2}:{3}/{4}'.format(
|
||||
"mongodb://{0}:{1}@{2}:{3}/{4}".format(
|
||||
db_config["user"],
|
||||
db_config["password"],
|
||||
db_config["host"],
|
||||
db_config["port"],
|
||||
db_config["name"]
|
||||
db_config["name"],
|
||||
)
|
||||
)
|
||||
db = db_client.get_database(name=db_config["name"])
|
||||
@@ -27,4 +27,4 @@ col_warnings = db.get_collection("warnings")
|
||||
# col_checkouts = db.get_collection("checkouts")
|
||||
# col_trackings = db.get_collection("trackings")
|
||||
# col_authorized = db.get_collection("authorized")
|
||||
# col_transactions = db.get_collection("transactions")
|
||||
# col_transactions = db.get_collection("transactions")
|
||||
|
@@ -33,4 +33,4 @@ async def config_set(key: str, value: Any, *path: str) -> None:
|
||||
string += f'["{key}"] = {value}'
|
||||
exec(string)
|
||||
await json_write(this_dict, "config.json")
|
||||
return
|
||||
return
|
||||
|
@@ -35,8 +35,9 @@ def config_set_sync(key: str, value: Any, *path: str) -> None:
|
||||
json_write_sync(this_dict, "config.json")
|
||||
return
|
||||
|
||||
|
||||
def guild_name(member: Member):
|
||||
if member.nick == None:
|
||||
return member.name
|
||||
else:
|
||||
return member.nick
|
||||
return member.nick
|
||||
|
Reference in New Issue
Block a user