コード例 #1
0
    async def remove(self, user: Member, author: Optional[Member] = None):
        player = Player(user)
        if player not in self.players:
            raise UsageException.not_in_lobby(self.channel, player)

        if author is None:
            # If a user removes themself, then _others_
            # can't add them back until the lobby resets.
            self.leavers.append(player)

        self.players.remove(player)

        await self.show(title=f"{player.get_name()} has left the lobby.")
コード例 #2
0
    async def remove(self,
                     user: Member,
                     author: Optional[Member] = None,
                     rage=False):
        player = Player(user)
        if player not in self.players:
            raise UsageException.not_in_lobby(self.channel, player)

        if author is None:
            # If a user removes themself, then _others_
            # can't add them back until the lobby resets.
            self.leavers.append(player)

        await self.unready(user)
        self.players.remove(player)

        if not rage:
            await self.show(desc=f"{player.get_name()} has Left")
        else:
            await self.show(desc=f"{player.get_name()} says see ya jerks")