diff --git a/botbotbot/__main__.py b/botbotbot/__main__.py index af91d79..2ebe7c1 100644 --- a/botbotbot/__main__.py +++ b/botbotbot/__main__.py @@ -28,6 +28,7 @@ aibot = AIBot( intents = discord.Intents.default() intents.members = True intents.message_content = True +intents.voice_states = True bot = discord.Bot(description=description, intents=intents) @@ -168,6 +169,12 @@ async def alea(ctx): await ctx.respond(embed=embed) +@bot.listen("on_voice_state_update") +async def voice_random_nicks(member, before, after): + if before.channel is None and random.random() < 1 / 24: + await try_shuffle(member.guild) + + @bot.slash_command( name="indu", guild_ids=guild_ids, description="Poser une question à MistralAI" )