Add random nicks on voice connection
This commit is contained in:
parent
b63ee3a12a
commit
50f32a620f
1 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,7 @@ aibot = AIBot(
|
||||||
intents = discord.Intents.default()
|
intents = discord.Intents.default()
|
||||||
intents.members = True
|
intents.members = True
|
||||||
intents.message_content = True
|
intents.message_content = True
|
||||||
|
intents.voice_states = True
|
||||||
|
|
||||||
bot = discord.Bot(description=description, intents=intents)
|
bot = discord.Bot(description=description, intents=intents)
|
||||||
|
|
||||||
|
@ -168,6 +169,12 @@ async def alea(ctx):
|
||||||
await ctx.respond(embed=embed)
|
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(
|
@bot.slash_command(
|
||||||
name="indu", guild_ids=guild_ids, description="Poser une question à MistralAI"
|
name="indu", guild_ids=guild_ids, description="Poser une question à MistralAI"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue