try to fix schizo cmd

This commit is contained in:
Milka64 2021-11-21 16:38:30 +01:00
parent 5bc0329c22
commit dc0ab7d0d7

View file

@ -418,7 +418,8 @@ class Mybot(commands.Cog):
await channel.send(sentence)
@commands.command(help='Who the fuck am i?')
async def schizo(self, ctx, name=None):
async def schizo(self, ctx, *names):
name = ' '.join(name)
list_name = ["Kabot", "Gaspard et Balthazar", "Bender", "Zoidberg", "Gunther"]
try:
current_name = self.bot.user.name
@ -427,9 +428,11 @@ class Mybot(commands.Cog):
pass
if not name:
name = random.choice(list_name)
if name in list_name:
lower_names = [x.lower() for x in list_name]
if name.lower() in lower_names:
if name:
await self.bot.user.edit(username=name)
correct_name = [x for x in list_name if x.lower() in nama.lower()][0]
await self.bot.user.edit(username=correct_name)
else:
name = "404"
await self.bot.user.edit(username="Error 404 name not found!")