try to fix schizo cmd
This commit is contained in:
parent
5bc0329c22
commit
dc0ab7d0d7
1 changed files with 6 additions and 3 deletions
|
@ -418,7 +418,8 @@ class Mybot(commands.Cog):
|
||||||
await channel.send(sentence)
|
await channel.send(sentence)
|
||||||
|
|
||||||
@commands.command(help='Who the fuck am i?')
|
@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"]
|
list_name = ["Kabot", "Gaspard et Balthazar", "Bender", "Zoidberg", "Gunther"]
|
||||||
try:
|
try:
|
||||||
current_name = self.bot.user.name
|
current_name = self.bot.user.name
|
||||||
|
@ -427,9 +428,11 @@ class Mybot(commands.Cog):
|
||||||
pass
|
pass
|
||||||
if not name:
|
if not name:
|
||||||
name = random.choice(list_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:
|
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:
|
else:
|
||||||
name = "404"
|
name = "404"
|
||||||
await self.bot.user.edit(username="Error 404 name not found!")
|
await self.bot.user.edit(username="Error 404 name not found!")
|
||||||
|
|
Loading…
Reference in a new issue