Fixed not working config
This commit is contained in:
parent
f9a8d6ddf6
commit
9d7a13f473
@ -30,7 +30,7 @@ class Logger(commands.Cog):
|
||||
@commands.Cog.listener()
|
||||
async def on_member_join(self, member: Member):
|
||||
|
||||
welcome_chan = ds_utils.get(self.client.get_guild(await config_get("guild")).channels, id=await config_get("logging", "channels", "text"))
|
||||
welcome_chan = ds_utils.get(self.client.get_guild(await config_get("guild")).channels, id=await config_get("welcome", "channels", "text"))
|
||||
rules_chan = ds_utils.get(self.client.get_guild(await config_get("guild")).channels, id=await config_get("rules", "channels", "text"))
|
||||
|
||||
if (member != self.client.user) and (member.bot == False) and (member.system == False):
|
||||
@ -38,8 +38,6 @@ class Logger(commands.Cog):
|
||||
await welcome_chan.send(content=(await config_get("welcome", "messages")).format(mention=member.mention, rules=rules_chan.mention))
|
||||
|
||||
if col_users.find_one({"user": member.id}) is None:
|
||||
col_users.insert_one(document=user)
|
||||
|
||||
user = {}
|
||||
defaults = await config_get("user", "defaults")
|
||||
|
||||
@ -47,3 +45,5 @@ class Logger(commands.Cog):
|
||||
|
||||
for key in defaults:
|
||||
user[key] = defaults[key]
|
||||
|
||||
col_users.insert_one(document=user)
|
Loading…
Reference in New Issue
Block a user