From fbe2ae8ec851a2e9e3e2370db3b812f268e8c8cb Mon Sep 17 00:00:00 2001 From: Dav Date: Fri, 28 May 2021 01:14:35 +0200 Subject: [PATCH] change some permissions stuff --- roomer/roomer.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/roomer/roomer.py b/roomer/roomer.py index 70c02c9..f999fe3 100644 --- a/roomer/roomer.py +++ b/roomer/roomer.py @@ -12,7 +12,7 @@ @cog_i18n(_) class Roomer(commands.Cog): - __version__ = "1.0.0" + __version__ = "1.0.1" def format_help_for_context(self, ctx: commands.Context) -> str: # Thanks Sinbad! And Trusty in whose cogs I found this. @@ -314,14 +314,10 @@ async def hidden(self, ctx: commands.Context, true_or_false: Optional[bool] = Tr try: for key in data: if data[key] == ctx.author.voice.channel.id: - ov = { - ctx.guild.default_role: discord.PermissionOverwrite( - view_channel=False, connect=False - ), - ctx.author: discord.PermissionOverwrite( - view_channel=True, connect=True, speak=True, manage_channels=True - ), - } + ov = ctx.author.voice.channel.overwrites + ov[ctx.guild.default_role] = discord.PermissionOverwrite( + view_channel=False, connect=False + ) if self.invoiceConfig: ov[ ctx.guild.get_role(