Add !gamenight

This commit is contained in:
Dylan Smith
2025-01-20 14:41:13 -05:00
parent f81b407b4c
commit 839c0ca7b6

View File

@@ -55,12 +55,24 @@ async def on_message(message):
await message.channel.send(response)
return
if (message.content.startswith("!gamenight")):
members = []
for vc in message.guild.voice_channels:
for member in vc.members:
members.append(member)
if len(members) == 0:
response = f'Ain\'t nobody to choose, ya {insult_generator.hit_me(1)}!'
else:
member_idx = random.randint(0,len(members)-1)
member = members[member_idx]
response = f'I choose {member.mention} to decide tonights game!'
await message.channel.send(response)
return
if (message.content.startswith("!")):
response = f'{message.author.mention} uh, *wat*? For a list of commands, type !help.'
await message.channel.send(response)
return
client.run(TOKEN)