mirror of
https://github.com/AsgardEternal/DiscordWhitelist.git
synced 2024-12-30 15:19:12 -06:00
fixes
This commit is contained in:
parent
9b9cee7c27
commit
9205638625
@ -16,16 +16,10 @@ class Group(commands.Cog, name="group"):
|
|||||||
|
|
||||||
async def baseperm(self, interaction: discord.Interaction, role: discord.Role, perms: str):
|
async def baseperm(self, interaction: discord.Interaction, role: discord.Role, perms: str):
|
||||||
if role.id in self.client.whitelistGrps.keys():
|
if role.id in self.client.whitelistGrps.keys():
|
||||||
await interaction.response.send_message(
|
|
||||||
f"**{role.name}** is already added, overwriting permissions..."
|
|
||||||
)
|
|
||||||
self.client.whitelistGrps[role.id].squadPerms = perms
|
self.client.whitelistGrps[role.id].squadPerms = perms
|
||||||
self.client.whitelistGrps[role.id].updateGroup()
|
self.client.whitelistGrps[role.id].updateGroup()
|
||||||
else:
|
else:
|
||||||
log.info(f"Adding {role.name} ({role.id}) as a Whitelist role")
|
log.info(f"Adding {role.name} ({role.id}) as a Whitelist role")
|
||||||
await interaction.response.send_message(
|
|
||||||
f"Adding **{role.name}** as a Whitelist role"
|
|
||||||
)
|
|
||||||
self.client.whitelistGrps[role.id] = config.WhitelistGroup(
|
self.client.whitelistGrps[role.id] = config.WhitelistGroup(
|
||||||
name=role.name, roleID=role.id, permissions=perms
|
name=role.name, roleID=role.id, permissions=perms
|
||||||
)
|
)
|
||||||
|
@ -29,6 +29,7 @@ class Whitelist(commands.Cog):
|
|||||||
except mysql.connector.Error as err:
|
except mysql.connector.Error as err:
|
||||||
log.error("MYSQL error!")
|
log.error("MYSQL error!")
|
||||||
await interaction.response.send_message("Could not find steamID!")
|
await interaction.response.send_message("Could not find steamID!")
|
||||||
|
return
|
||||||
for urole in interaction.user.roles:
|
for urole in interaction.user.roles:
|
||||||
if urole.id in self.client.whitelistGrps.keys():
|
if urole.id in self.client.whitelistGrps.keys():
|
||||||
disusername = interaction.user.nick if interaction.user.nick is not None else interaction.user.name
|
disusername = interaction.user.nick if interaction.user.nick is not None else interaction.user.name
|
||||||
|
Loading…
Reference in New Issue
Block a user