Skip to content

Commit

Permalink
Update core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AAA3A-AAA3A committed Sep 24, 2023
1 parent 7041cb5 commit e77bf9c
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions battleroyale/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,7 @@ async def battleroyale(

game: Game = Game(cog=self, delay=delay, skip=skip)
self.games[join_view._message] = game
try:
await game.start(ctx, players=players, original_message=join_view._message)
except Exception as e:
self.log.exception("Something went wrong while starting the game.", exc_info=True)
await game.start(ctx, players=players, original_message=join_view._message)

@battleroyale.command()
async def auto(
Expand Down Expand Up @@ -465,9 +462,7 @@ async def role(
).set_thumbnail(url=SWORDS)
)
return
users: List[discord.Member] = []
for member in role.members:
users.append(member)
users: List[discord.Member] = list(role.members)
players: List[discord.Member] = list(filter(lambda u: not u.bot, users))
if ctx.author not in players:
players.append(ctx.author)
Expand All @@ -488,10 +483,7 @@ async def role(
embed.set_thumbnail(url=SWORDS)
message = await ctx.send(embed=embed)
self.games[message] = game
try:
await game.start(ctx, players=players, original_message=message)
except Exception as e:
self.log.exception("Something went wrong while starting the game.", exc_info=True)
await game.start(ctx, players=players, original_message=message)

@battleroyale.command(name="profile", aliases=["stats"])
async def profile(self, ctx: commands.Context, *, user: Optional[discord.Member] = None):
Expand Down

0 comments on commit e77bf9c

Please sign in to comment.