Skip to content

Commit

Permalink
set to the calling user for getting settings
Browse files Browse the repository at this point in the history
  • Loading branch information
camalot committed Jun 27, 2024
1 parent 6611022 commit 997de2f
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions bot/cogs/channel_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,21 +190,20 @@ async def on_voice_state_update(self, member, before, after):
category_id = after.channel.category_id
source_channel = after.channel
source_channel_id = after.channel.id
channel_owner_id = self.channel_db.get_channel_owner_id(
guildId=guild_id, channelId=source_channel_id
)
if channel_owner_id is None:
channel_owner_id = member.id

userSettings = self.usersettings_db.get_user_settings(
guildId=guild_id, userId=channel_owner_id or member.id
guildId=guild_id, userId=member.id
)
# self.log.debug(
# guild_id, f"{self._module}.{self._class}.{_method}", f"User Settings: {json.dumps(userSettings.__dict__)}"
# )

if userSettings is not None:
self.log.debug(
guild_id, f"{self._module}.{self._class}.{_method}", f"User Settings: {json.dumps(userSettings.__dict__)}"
)

guildSettings = self.settings.db.get_guild_category_settings(
guildId=guild_id, categoryId=category_id
)

useStage = (
self.guild_db.get_use_stage_on_create(
guildId=guild_id, channelId=source_channel_id, categoryId=category_id
Expand Down

0 comments on commit 997de2f

Please sign in to comment.