# Path: dozer/cogs/info.py
# class Info(Cog):
#     async def slash_member(self, ctx: SlashContext, member: discord.Member = None):
#     async def member(self, ctx, *, member: discord.Member = None):
#     def _format_activities(activities: typing.Sequence[discord.Activity]) -> typing.List[str]:
#         def format_activity(activity: discord.Activity) -> str:
#     def pluralize(values: typing.List[str]) -> str:
#     async def slash_role(self, ctx: SlashContext, role: discord.Role):
#     async def role(self, ctx, role: discord.Role):
#     async def slash_rolemember(self, ctx: SlashContext, role: discord.Role):
#     async def rolemembers(self, ctx, role: discord.Role):
#     async def slash_guild(self, ctx: SlashContext):
#     async def guild(self, ctx):
# def setup(bot):


import discord
from discord.ext.commands import has_permissions, BadArgument
from ._utils import *
from .info import blurple
from .. import db
                config = await Voicebinds.get_by(channel_id=before.channel.id)
                if len(config) != 0:
                    await member.remove_roles(member.guild.get_role(config[0].role_id))
            if after.channel is not None:
                # join event, give role
                config = await Voicebinds.get_by(channel_id=after.channel.id)
                if len(config) != 0:
                    await member.add_roles(member.guild.get_role(config[0].role_id))

    @Cog.listener('on_voice_state_update')  # Used for auto PTT
    async def on_PTT_check(self, member, before, after):
        """Runs the autoPTTcheck when a user leaves and/or joins a vc"""
        # skip this if we have no perms to edit voice channel
        total_users = 0
        if member.guild.me.guild_permissions.manage_channels and before.channel != after.channel:
            # determine if it's a join/leave event as well.
            # before and after are voice states
            if before.channel is not None:
                # leave event, take role
                await self.auto_ptt_check(before)
            if after.channel is not None:
                # join event, give role
                await self.auto_ptt_check(after)

    @command()
    @bot_has_permissions(manage_channels=True)
    @has_permissions(manage_channels=True)
    async def autoptt(self, ctx, voice_channel: discord.VoiceChannel, ptt_threshold: int):
        """Configures AutoPtt limit for when members join/leave voice channels ptt is enabled"""


# Path: dozer/cogs/info.py
# class Info(Cog):
#     async def slash_member(self, ctx: SlashContext, member: discord.Member = None):
#     async def member(self, ctx, *, member: discord.Member = None):
#     def _format_activities(activities: typing.Sequence[discord.Activity]) -> typing.List[str]:
#         def format_activity(activity: discord.Activity) -> str:
#     def pluralize(values: typing.List[str]) -> str:
#     async def slash_role(self, ctx: SlashContext, role: discord.Role):
#     async def role(self, ctx, role: discord.Role):
#     async def slash_rolemember(self, ctx: SlashContext, role: discord.Role):
#     async def rolemembers(self, ctx, role: discord.Role):
#     async def slash_guild(self, ctx: SlashContext):
#     async def guild(self, ctx):
# def setup(bot):


# Path: dozer/cogs/voice.py
import discord
from discord.ext.commands import has_permissions, BadArgument
from ._utils import *
from .info import blurple
from .. import db

                config = await Voicebinds.get_by(channel_id=before.channel.id)
                if len(config) != 0:
                    await member.remove_roles(member.guild.get_role(config[0].role_id))
            if after.channel is not None:
                # join event, give role
                config = await Voicebinds.get_by(channel_id=after.channel.id)
                if len(config) != 0:
                    await member.add_roles(member.guild.get_role(config[0].role_id))

    @Cog.listener('on_voice_state_update')  # Used for auto PTT
    async def on_PTT_check(self, member, before, after):
        """Runs the autoPTTcheck when a user leaves and/or joins a vc"""
        # skip this if we have no perms to edit voice channel
        total_users = 0
        if member.guild.me.guild_permissions.manage_channels and before.channel != after.channel:
            # determine if it's a join/leave event as well.
            # before and after are voice states
            if before.channel is not None:
                # leave event, take role
                await self.auto_ptt_check(before)
            if after.channel is not None:
                # join event, give role
                await self.auto_ptt_check(after)

    @command()
    @bot_has_permissions(manage_channels=True)
    @has_permissions(manage_channels=True)
    async def autoptt(self, ctx, voice_channel: discord.VoiceChannel, ptt_threshold: int):
        """Configures AutoPtt limit for when members join/leave voice channels ptt is enabled"""


        e = discord.Embed(color=blurple)