def on_member_ban(self, guild, member):
if member.voice.channel is None:
return
guild_config = await self.bot.get_guild_config(guild.id)
if guild_config["teamspeakBanSound"]:
vc = await member.voice.channel.connect()
src = discord.FFmpegPCMAudio("bot/resources/user_banned.mp3")
vc.play(src)
await asyncio.sleep(5)
await vc.disconnect()
评论列表
文章目录