1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00

refactor(temp_vc.py): rename handle_user_join and handle_user_leave methods to _handle_user_join and _handle_user_leave to indicate these are internal methods

This commit is contained in:
kzndotsh 2024-08-29 03:50:54 +00:00
parent f446ea6359
commit 632a68fa93

View file

@ -49,13 +49,13 @@ class TempVc(commands.Cog):
# When user joins the temporary voice channel
if after.channel and after.channel.id == temp_channel_id:
await self.handle_user_join(member, after.channel)
await self._handle_user_join(member, after.channel)
# When user leaves any voice channel
elif before.channel:
await self.handle_user_leave(before.channel, after.channel, temp_channel_id, temp_category_id)
await self._handle_user_leave(before.channel, after.channel, temp_channel_id, temp_category_id)
async def handle_user_join(
async def _handle_user_join(
self,
member: discord.Member,
channel: discord.VoiceChannel | discord.StageChannel,
@ -81,7 +81,7 @@ class TempVc(commands.Cog):
new_channel = await channel.clone(name=self.base_vc_name + member.name)
await member.move_to(new_channel)
async def handle_user_leave(
async def _handle_user_leave(
self,
before_channel: discord.VoiceChannel | discord.StageChannel,
after_channel: discord.VoiceChannel | discord.StageChannel | None,