Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
fixed game
Browse files Browse the repository at this point in the history
  • Loading branch information
djetelina committed Jun 6, 2016
1 parent dc9ee62 commit 953a0e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cogs/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async def play(self, ctx):
if len(games) > 0:
reply = "People are playing:\n"
for game_name, game in games.items():
reply += "\n**{}** ({} player/s, managed by {})".format(
reply += "\n**{}** ({} player(s), managed by {})".format(
game_name, len(game.players), game.owner.name)
reply += "\n\nJoin them by typing !game join **Game**"

Expand Down Expand Up @@ -185,8 +185,9 @@ async def _desc(self, ctx, *, description):
async def _close(self, ctx):
for game_name, running_game in games.items():
if ctx.message.author == running_game.owner:
running_game.cancel()
to_close = running_game.cancel()
await self.bot.say("Session for {0} is now closed!".format(running_game.game))
break

@play.command(name="join", pass_context=True, description=desc.game_join, brief=desc.game_join)
async def _join(self, ctx, *, game: str):
Expand All @@ -211,7 +212,7 @@ async def _join(self, ctx, *, game: str):
for game_name, running_game in games.items():
if game_name.lower() == game.lower():
found = 1
reply = "{0} joined {1}".format(user.name, running_game.game)
reply = running_game.join(user)
if running_game.description:
await s.whisper(user, "You joined {}, here's information by {}: {}".format(
game_name, running_game.owner.name, running_game.description), self.bot)
Expand Down
2 changes: 1 addition & 1 deletion cogs/restricted.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def nick(self, ctx, *, nick: str):
except Exception as e:
log.exception("Couldn't change display name")

@commands.command(description=desc.iscream)
@commands.command(hidden=True, description=desc.iscream)
@checks.is_scream()
async def update(self):
version = self.bot.get_cog('Versioning')
Expand Down

0 comments on commit 953a0e5

Please sign in to comment.